braintree / braintree_android

Braintree SDK for Android
https://developer.paypal.com/braintree/docs/start/hello-client/android/v4
MIT License
405 stars 232 forks source link

Caused by: java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation #323

Closed 0xAliHn closed 2 years ago

0xAliHn commented 3 years ago

I am having this issue for Android O(API 26) version when the braintree sca page is triggered. Here is my manifest config:

        <activity
            android:name=".ui.BraintreeActivity"
            android:screenOrientation="portrait"
            android:theme="@style/BraintreeTheme" />

And here is our styles.xml file

    <style name="BraintreeTheme" parent="AppTheme">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>

When Sca page is triggering the app is crashed and showing this issue. Note: I need to keep this android:windowIsTranslucent">true< and also the android:screenOrientation=portrait. How can make it workable for Android O?

sarahkoop commented 3 years ago

Hi @0xAliHn, thanks for using the Braintree Android SDK. Some additional information could be helpful in investigating this issue. Which version of the SDK are you using? Did you previously have a working integration and this error occurs upon upgrading the SDK, or is this the initial integration?

At this point, it appears to be an issue with Themes in Android O, rather than the SDK. There may be some useful information in this StackOverflow post.

sarahkoop commented 3 years ago

Hi @0xAliHn are you still experiencing this issue or did that information help resolve?

sarahkoop commented 2 years ago

Closing this issue due to inactivity - please feel free to re-open if the issue is not resolved.