Search code examples
androidflurrylandscape-portrait

How to prevent Flurry change orientation of my activity?


One of my activities in my app has an android:screenOrientation="portrait" attribute in the manifest, as I don't want it to change orientation. I'm trying to integrate Flurry like this:
in onStart:

FlurryAgent.onStartSession(this, "api_key");
FlurryAgent.initializeAds(this);
FrameLayout adsFrameLayout = (FrameLayout)findViewById(R.id.frameLayoutAdsContent);
FlurryAgent.getAd(this, "BannerTop-1", adsFrameLayout, FlurryAdSize.BANNER_BOTTOM, 0);

in inStop:

FlurryAgent.onEndSession(this);

and in the AndroidManifest.xml:

 <activity
        android:name="com.flurry.android.FlurryFullscreenTakeoverActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode"
        android:screenOrientation="portrait" >
    </activity>

What happens is that Flurry lets the activity to change orientation (when device is turned ti landscape). if I don't run the code in onStart the activity doesn't change its orientation.

thanks in advance, Amitos80


Solution

  • After a long research i found that this can't be done. flurry overrides my configuration and enables the screen to change orientation to landscape. if someone ever find a solution please share.