Description:
Trusted Web Activities (TWA) are a new way to create Android applications from websites. Google has written a guide about how to create a TWA: https://developers.google.com/web/updates/2019/02/using-twa
There is currently nothing in the OneSignal documentation about TWA: what is the best practice to handle notifications in a TWA?
Should we handle it like a PWA and don't include the Onesignal Android SDK (and use web push notifications) or should we integrate the SDK into the TWA to benefit from Android native notifications?
In this issue, the issue author tries to integrate the Onesignal Android SDK in a TWA but is stuck by a duplicate class problem: https://github.com/OneSignal/OneSignal-Android-SDK/issues/762
Thanks for your recommendation. We will consider adding this in the future
We will continue tracking this request internally
implementation ('com.onesignal:OneSignal:3.12.7') {
exclude group: "com.android.support", module: "customtabs"
}
This will work :)
implementation ('com.onesignal:OneSignal:3.12.7') { exclude group: "com.android.support", module: "customtabs" }This will work :)
is this the only code we need to add to the gradle? or do we need to add the onesignal key as well?
Hey! Would really appreciate some closure to this. I've got a TWA app as well and I've implemented OneSignal for Web Push at the moment. Is the above mentioned comment the right way to go for the Android implementation or are we better off using the Android SDK or wrapping it in Cordova?
implementation ('com.onesignal:OneSignal:3.12.7') { exclude group: "com.android.support", module: "customtabs" }This will work :)
No it does not, receive following error in android studio.
"Manifest merger failed with multiple errors, see logs"
Most helpful comment
This will work :)