Skip to content

Commit

Permalink
up readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Nov 16, 2024
1 parent 57c78a6 commit bf6f52b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,19 +267,19 @@ To build the APK:
- Make sure your `new folder` contains these two folders `SmartTwitchTV` and `media` before proceeding to the next step
- Install **Android Studio**, open it and add a new project ... File -> Open... Select the folder [SmartTwitchTV/apk](https://github.com/fgl27/SmartTwitchTV/tree/master/apk)
- Wait for **Android Studio** to finish it's preparation, it will load and download all app dependencies and etc related needed for this app, if it asks to install extra dependencies/sdk/etc follow its instructions
- Comment out [Crashlytics and related services](https://github.com/fgl27/SmartTwitchTV/commit/b421b6a504a922da1e0bfd53a29610801c84ff29), this app uses [Firebase Crashlytics](https://firebase.google.com/docs/crashlytics) to be able to get crash reports from the app and use those to improve it, that process uses a file `google-services.json` in that file there are private keys that can't be published, so in order to build the app for testing you need to comment out a few lines - those lines start with `Crashlytics` and end `Crashlytics end` comment out all in between on this files [SmartTwitchTV/apk/build.gradle](https://github.com/fgl27/SmartTwitchTV/blob/master/apk/build.gradle) and [SmartTwitchTV/apk/app/build.gradle](https://github.com/fgl27/SmartTwitchTV/blob/master/apk/app/build.gradle)
- [Use this commit as example on how to Comment out Crashlytics and related services](https://github.com/fgl27/SmartTwitchTV/commit/b421b6a504a922da1e0bfd53a29610801c84ff29), this app uses [Firebase Crashlytics](https://firebase.google.com/docs/crashlytics) to be able to get crash reports from the app and use those to improve it, that process uses a file `google-services.json` in that file there are private keys that can't be published, so in order to build the app for testing you need to comment out a few lines use the commit as example.
- Building the APK, in **Android Studio**, Build -> Build Bundle(s) / APK(s) -> Build APK(s)... if all OK after a few moments an app will be generated, a popup notification inside **Android Studio** will show and let you click to see where that APK is generated to.
- If you have any problem using **Android Studio** just try to google as the project is solely built using **Android Studio** it must work for you, if it doesn't it's because you did something wrong, **Android Studio** APK build is a very common thing one can find any type of help about it just by "googling it", but if you have a problem that you can't solve [open a issue](https://github.com/fgl27/SmartTwitchTV/issues/new/choose) or [send a email fglfgl27@gmail.com](mailto:fglfgl27@gmail.com)
- If you have any problem using **Android Studio** just try to google for help, as the project is solely built using **Android Studio** it must work for anyone, but sometimes doesn't if you have a problem that you can't solve [open a issue](https://github.com/fgl27/SmartTwitchTV/issues/new/choose) or [send a email fglfgl27@gmail.com](mailto:fglfgl27@gmail.com)

## How to test the Web app

### In an browser

You can just open the [SmartTwitchTV/app/index.html](https://github.com/fgl27/SmartTwitchTV/tree/master/app/index.html) in a browser, but that will not allow you to, for example, add a user and authorization key.

To be able to do that, you need to run this html from the https link https://127.0.0.1:5000/app/, to do that you can just use Node.js extension `http-server` to create a web server and call the link https://127.0.0.1:5000/app/.
To be able to do that, you need to run this html from the https link https://127.0.0.1:5000/app/, to do that you can just use Node.js extension `http-server` (npm install http-server -g) to create a web server and call the link https://127.0.0.1:5000/app/.

I have made a simple script that starts the server at the correct URL just call this if you are on Linux [SmartTwitchTV/release/scripts/up_assets.sh](https://github.com/fgl27/SmartTwitchTV/tree/master/release/scripts/up_assets.sh), or [use this command](https://github.com/fgl27/SmartTwitchTV/blob/9c157c457751525f84e19126190389c498a4876a/release/scripts/http-server.sh#L23) from root project directory.
I have made a simple script that starts the server at the correct URL just call this if you are on Linux [SmartTwitchTV/release/scripts/http-server.sh](https://github.com/fgl27/SmartTwitchTV/tree/master/release/scripts/http-server.sh) or Windows (CMD or powerShell) [SmartTwitchTV/release/scripts/http-server_windows](https://github.com/fgl27/SmartTwitchTV/tree/master/release/scripts/http-server_windows), or [use this command](https://github.com/fgl27/SmartTwitchTV/blob/9c157c457751525f84e19126190389c498a4876a/release/scripts/http-server.sh#L23) from root project directory.

### Inside the APK

Expand Down
5 changes: 5 additions & 0 deletions release/scripts/http-server_windows.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off

start https://127.0.0.1:5000/app/

http-server -a 127.0.0.1 -p 5000 -S -C release/scripts/cert.pem -K release/scripts/key.pem -c-1

0 comments on commit bf6f52b

Please sign in to comment.