0

Sorry if I don't provide enough context, but I'm and iOS Developer and I'm posting this because my Android colleague is off for a few weeks 😅

We're getting this crash in our app, which has the Marketing Cloud SdK integrated, but it's only happening in versions 5 and 6 of Android.

Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.imaginecurve.curve.prd/com.salesforce.marketingcloud.messages.iam.IamFullscreenActivity}: 
android.util.AndroidRuntimeException: requestFeature() must be called before adding content
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2464)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524)
       at android.app.ActivityThread.access$900(ActivityThread.java:154)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:234)
       at android.app.ActivityThread.main(ActivityThread.java:5526)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by android.util.AndroidRuntimeException: requestFeature() must be called before adding content
       at com.android.internal.policy.PhoneWindow.requestFeature(PhoneWindow.java:324)
       at android.app.Activity.requestWindowFeature(Activity.java:3690)
       at com.salesforce.marketingcloud.messages.iam.IamFullscreenActivity.a(IamFullscreenActivity.java)
       at com.salesforce.marketingcloud.messages.iam.IamFullscreenActivity.onCreate(IamFullscreenActivity.java)
       at android.app.Activity.performCreate(Activity.java:6285)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2524)
       at android.app.ActivityThread.access$900(ActivityThread.java:154)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1391)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:234)
       at android.app.ActivityThread.main(ActivityThread.java:5526)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Our team is not able to find out the source of the crash just looking at this logs. Is anybody familiar with this error that can give our team some help ? Thanks in advance.

1

1 Answer 1

0

This is a known issue for the "Full Image Fill" InApp Message template rendering in the Android SDK version 7.2 and earlier on versions 5 & 6 of Android.

This will be fixed in a future release of the SDK.

In the interim, a simple workaround is to isolate the Android 5 & 6 devices in your data extension and send the "Full Screen" templated messages to those devices instead.

The differences can be seen here:

FULL SCREEN: enter image description here

FULL IMAGE FILL: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.