Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on Kindle Fire devices #73

Closed
strygo opened this issue Feb 29, 2020 · 5 comments
Closed

Issue on Kindle Fire devices #73

strygo opened this issue Feb 29, 2020 · 5 comments

Comments

@strygo
Copy link

strygo commented Feb 29, 2020

When attempting to use an app built using this project on a Kindle Fire device, the splash screen of the app hangs and then the browser interface is not launched.

I have noticed this in the debug output:
D/TWAProviderPicker: Found TWA provider, finishing search: com.amazon.cloud9

According to this log entry, it appears that Amazon's browser is advertising compatibility. I was surprised by this - I had assumed that a fallback strategy would be employed (in my case a WebView activity). I'm not sure if Amazon's browser actually has support or not.

To Reproduce
Steps to reproduce the behavior:

  1. Build functioning TWA app
  2. Run TWA app on an Amazon device
  3. Observe that TWA experience isn't launched

Expected behavior
Either the TWA experience working or the fallback strategy being employed.

Did this ever used to work
Unknown

Smartphone (please complete the following information):

  • Device: Kindle Fire 7
  • OS: Fire OS 5.3.7.0, Android 5.1.1
  • Browsers Installed: Silk Browser
  • Browser Versions: 79.4.9.3945.136.10
  • android-browser-helper library version: 1.1.0
@andreban
Copy link
Member

andreban commented Mar 2, 2020

Thanks for filing this.

This is a bit surprising to me as well. It seems Silk Browser advertises itself to have Trusted Web Activity support but in reality it doesn't.

This is more of a bug in Silk Browser itself, as android-browser-helper is designed to use other browsers that support the protocol. Unfortunately, I couldn't find where to file bugs for Silk browser.

Having said that, we could add a workaround to explicitly ignore com.amazon.cloud9 as a Trusted Web Activity provider. @PEConn for thoughts on this.

@strygo
Copy link
Author

strygo commented Mar 2, 2020

Similar to in #65, it would be helpful to give a hook that allows you to override behavior at launch. I would like to be able to override this cloud9 browser myself. Like the person in that issue, I also would prefer not to use TWAs in leanback mode (since I would actually prefer the browser session to be isolated).

@andreban
Copy link
Member

andreban commented Mar 2, 2020

The FallbackStrategy lets you override the behaviour for when launching a Trusted Web activity fails. But I think the ask here is to make easier to customize the check for Trusted Web Activity support. Is this correct?

@strygo
Copy link
Author

strygo commented Mar 2, 2020

Yes, that's correct. There are a few things that I'd like to be able to programattically override:

  1. Whether to use the TWA based on my own logic (in this case, if running on a Kindle Fire, also, if I'm on a leanback device)
  2. Which URL to start from (in the case of leanback, I'd like to use a different URL)

The latter isn't an immediate issue because I now have a different activity handling leanback (since I have my own webview fallback activity to modify). If I were using a built-in handler, I'd like to be able to override things.

@andreban
Copy link
Member

This should be possible with android-browser-helper already, but not via the LauncherActivity. The twa-custom-launcher demo shows how to write your own launcher and use TwaLauncher to open a Trusted Web Activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants