NativeAlphaForAndroid icon indicating copy to clipboard operation
NativeAlphaForAndroid copied to clipboard

Open site in NA with mini app instead of shortcut ?

Open ylavi opened this issue 7 months ago • 1 comments

The app works very nicely - thank you!

However I'd like to use it on Android TV which doesn't use the shortcuts which Native Alpha creates. To run this sort of thing you need an app which will call the app you need. Then an appropriate ATV launcher/utility can run that app.

I see two possibilities for getting such an APK:

  • Use Tasker or the like to activate the app programmatically (with an intent?) and then generate an APK from that
  • Native Alpha generates an APK itself as an alternative to the shortcut. Apparently this may also be useful for other systems such as car head units.

An example of app generation can be found in TvAppRepo but that only runs an app or opens a URL (running the default browser) and here we need to run NA in a way which calls the appropriate function. I'm not sure whether an app tagged as for ATV will work on other platforms, but maybe if NA can detect what it's running on it could generate an appropriate app.

Is there any chance of adding a feature like this or at least documenting how we can call NA in a way which emulates the shortcut?

Thanks!

ylavi avatar Aug 11 '25 12:08 ylavi

Hi, first things first - I cannot give you a definitive answer to your question right away. I have an Android TV device lying around somewhere, but I don't know much about Android TV from a developer's perspective. Certainly, the UI is not optimized for TVs, I remember you can navigate in some sideloaded apps by using the arrow keys but I never actually tried Native Alpha on TV.

If I understand you correctly, what you are seeking is the same functionality Native Alpha has on mainline Android - shortcuts to websites on the main launcher screen.

Native Alpha generates an APK itself as an alternative to the shortcut. Apparently this may also be useful for other systems such as car head units.

I see where you are coming from, but this is a huge red flag if you want to distribute your app in any app store. Nobody should trust an app which wants to install other APKs (app stores being the obvious exception). You need special permissions for the app in order to even make such an request. Also, compiling a APK file on the fly on Android (if you meant it like that) is probably not possible.

Essentially, there are two options:

If it is possible to make a shortcut on Android TV which opens sideloaded apps with a certain Activity (other than the main entry point, the MainActivity), then it is relatively easy (for a tech-savvy user). Just open WebViewActivity with the right web app ID in the Intent and you are done.

If not, then what I can do is to document how you'd build Native Alpha with a single hardcoded Web App, which then just opens as the MainActivity. Obviously, this approach is neither user-friendly, nor does it scale well. You'd need to do it for every single website once and repeat it for updates.

Other than that, Android TV may offer some alternative ways to put "shortcuts" such as the Channels. I cannot say that native support for Android TV has a high priority though.

I will try to play around a bit with the app on the TV and see what I can find out.

cylonid avatar Aug 14 '25 15:08 cylonid