You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Klaviyo.initialize() call crashes due to missing permissions that are not available when running an instant app. This can be easily reproduced on Android Studio when running the application as an instant app.
In the android documentation (https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle#configure-permissions), it says that we cannot use the permission CHANGE_NETWORK_STATE that is currently being used on the core module.
Stack Trace:
...
java.lang.SecurityException: x.x.x was not granted either of these permissions:android.permission.CHANGE_NETWORK_STATE,android.permission.WRITE_SETTINGS.
...
Caused by: java.lang.SecurityException: pt.napps.shop was not granted either of these permissions:android.permission.CHANGE_NETWORK_STATE,android.permission.WRITE_SETTINGS.
...
at com.klaviyo.core.networking.KlaviyoNetworkMonitor.initializeNetworkListener(KlaviyoNetworkMonitor.kt:120)
at com.klaviyo.core.networking.KlaviyoNetworkMonitor.onNetworkChange(KlaviyoNetworkMonitor.kt:54)
at com.klaviyo.analytics.networking.KlaviyoApiClient.startService(KlaviyoApiClient.kt:50)
at com.klaviyo.analytics.Klaviyo$initialize$1.invoke(Klaviyo.kt:69)
at com.klaviyo.analytics.Klaviyo$initialize$1.invoke(Klaviyo.kt:55)
at com.klaviyo.core.KlaviyoExceptionKt.safeCall(KlaviyoException.kt:23)
at com.klaviyo.core.KlaviyoExceptionKt.safeCall$default(KlaviyoException.kt:19)
at com.klaviyo.analytics.Klaviyo.initialize(Klaviyo.kt:55)
...
Expected behavior
For the SDK, to be able to run on instant apps.
Actual behavior
Currently, the SDK fails to initialize on instant apps.
Steps to reproduce
1. Create new project or reuse existing
2. Follow steps to run app as instant app https://developer.android.com/topic/google-play-instant/getting-started/instant-enabled-app-bundle#test-from-studio3. See stack trace
The Klaviyo Android SDK version information
3.0.0
Device Information
Pixel 8 Pro API 35
Android Studio Version
Android Studio Ladybug | 2024.2.1 Beta 1
Android API Level
API Level 35
The text was updated successfully, but these errors were encountered:
Hey, thanks for reporting this issue.
We currently do not support instant apps through our SDK offerings. Android instant apps have their own set of allowed permissions that are more restrictive than standard app permissions which you can view in the developer documentation here. Since we utilize some of these permissions we're not going to be compatible with instant apps without significant development work.
We will keep this issue open as a feature request and continue to consider its priority in the future.
Checklist
master
branch or latest release of this package.Description
Expected behavior
Actual behavior
Steps to reproduce
The Klaviyo Android SDK version information
3.0.0
Device Information
Pixel 8 Pro API 35
Android Studio Version
Android Studio Ladybug | 2024.2.1 Beta 1
Android API Level
API Level 35
The text was updated successfully, but these errors were encountered: