Don't check for Intent.CATEGORY_BROWSABLE in isFullBrowser#469
Don't check for Intent.CATEGORY_BROWSABLE in isFullBrowser#469kristerkari wants to merge 1 commit into
Conversation
04144ec to
06937a1
Compare
Codecov Report
@@ Coverage Diff @@
## master #469 +/- ##
============================================
- Coverage 83.71% 83.66% -0.05%
+ Complexity 479 478 -1
============================================
Files 42 42
Lines 2345 2344 -1
Branches 233 232 -1
============================================
- Hits 1963 1961 -2
- Misses 299 300 +1
Partials 83 83
Continue to review full report at Codecov.
|
|
|
Thanks @childnode! I'm not an Android developer myself, so I'm not familiar with the browser detection on native side. I'm only trying to get the Opera issue solved as it happening for our users. @childnode would you be able to help me a bit to get the issue solved? I can do the changes, but I would just need to know where to check what. So, did I understand correctly that the |
|
hi @kristerkari , I'm actually in android dev but not that familar with the details of CustomTabs yet but struggling different issues with that as you do. So,
I think the query for We might / should check the package for other activities that at least one has the CATEGORY_APP_BROWSER added to that indicates this is a real browser app but not just anyone who can view http sites ... yes, this might be a good replacement. as I read https://developer.chrome.com/multidevice/android/customtabs#preparing-for%20other%20browsers it became obvious that another quirk code page is where default browser is set first in the list. Proof me wrong, but default browser overrides first (and second, if it has customTabs support) entry in the browsers list even there is already a browser contained in. ℹ️ second we do have opera users, where getAllBrowsers only returns the fullBrowser descriptor but none for the customTabs service. on other devices (same OS, same device type, same Opera version) we do get the customTabs service as a second descriptor as expected ;/ << any hints welcome which might cause this additionally we do have users, where not all browsers are reported, but this might be related to #459 |
|
@kristerkari you were to look into the BROWSABLE category but the problem was on Opera's side. Per https://developer.android.com/training/basics/intents/package-visibility-use-cases#check-browser-available checking BROWSABLE is the right thing to do, and browser apps should ensure they declare their intents correctly. |
I have seen from our company's Sentry that some users have been getting the
ActivityNotFoundExceptionerror fromAppAuth-Android. The reason is that the users are using Opera as the default browser, andAppAuth-Androiddoes not seem to handle that properly.The main reason seems to be that Opera does not expose
Intent.CATEGORY_BROWSABLEand because of that it's not marked as a full browser and gets dropped of the browser listing.I'm not sure if this is a good way of fixing the issue, but it at least should fix the problem. Let me know if there is some other way to handle the support for Opera.
Fixes #452
@iainmcgin