Nullpointerexception When Using Trusted Web Activities On Android (multiple Devices)
I'm using TrustedWebActivities and I'm getting an immediate app crash on Samsung S8, S9, and Pixel 2 devices with the below Exception. Some research suggests that this might happe
Solution 1:
this issue has been fixed as commit https://github.com/GoogleChrome/custom-tabs-client/commit/51a4ff1d07d8507b934fc9d9af226a969b6c4674?diff=split#diff-39c75633d34184d98d2495b5686172dbL132-R136
you can update the version in gradefile, it should work
implementation 'com.github.GoogleChrome.custom-tabs-client:customtabs:d08e93fce3fb3e1f22214ee2f23fddc4f4e92634'
as you can check the diff, the validate function has been deleted.
session.validateRelationship(CustomTabsService.RELATION_HANDLE_ALL_URLS, uri, null);
However, as google team mention on readme that we should use Adnroid Browser Helper instead.
Please use the Android Browser Helper library instead. It contains the same functionality updated to work with AndroidX.
https://github.com/GoogleChrome/android-browser-helper
Post a Comment for "Nullpointerexception When Using Trusted Web Activities On Android (multiple Devices)"