razeware / emitron-Android

Android version of emitron
Apache License 2.0
55 stars 30 forks source link

Enable app usage while in debug mode #328

Closed filbabic closed 3 years ago

filbabic commented 3 years ago

This is to discuss how we can allow people to use the app to contribute to development.

This was the proposal:

@sammyd Let me know if this makes sense or not. I'm not sure if we should enable downloads too if the user is in DEBUG. I think with a bit of hotwiring we could do that too.

I've built a prototype already that I'll link in a PR and I'll ping you there with the progress so we can discuss further steps.

sammyd commented 3 years ago

This sounds perfect—thanks @filbabic

Regarding downloads—they're currently gated on the backend, so we can't make that change in the app alone. Developers need an API_TOKEN to have access to the download endpoints. The current approach is that if a contributor really wants to work on downloads, then we'll issue a unique download key so they can work on it. It's not ideal, but I think it's ok for now.

If/when we switch to HLS downloads, this will no longer be the case, at which point downloads can be opened up for free videos in the same way as the streams.

filbabic commented 3 years ago

@sammyd Yeah, my thoughts exactly, I know we have special keys to access that API, but once HLS is used, we'll be able to railroad the experience of free vs locked content.

I've attached you to the PR to explain what I did and show some images of how it looks. I tested the thing and it seems to be working fine, all according to what we had planned.

Even if the contributor tries hardcoding the flags to open up videos in the app, they'll be blocked through the DL/stream API, so we're all good there.

The only thing that's missing now is for me to write up the guide/change the readme to explain how to set up Emitron, which should require only creating a basic empty Firebase project & adding the google-services.json file.