freshplanet / ANE-Facebook

Air Native Extension (iOS and Android) for the Facebook mobile SDK
Apache License 2.0
221 stars 123 forks source link

Readme update in the app.xml to solve problems #146

Closed Jacowaco closed 7 years ago

Jacowaco commented 10 years ago

Hi, The readme and the gitHub main page say you should use this in the app.xml on Android:

<activity android:name="com.facebook.LoginActivity"/>
<activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"></activity>
<activity android:name="com.freshplanet.ane.AirFacebook.DialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"></activity>

I had many problems with this ANE in the Galaxy S4 and in any Android device, as the facebook alerts (like accepting app's permissions) didn't appear over my app. My app got minimized and then the alert would appear, causing many problems.

But if i set the android:theme attribute to the first activity too, the problems disappear. Replacing that part of the applicacion.xml with this:

<activity android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" />
<activity android:name="com.freshplanet.ane.AirFacebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"></activity>
<activity android:name="com.freshplanet.ane.AirFacebook.DialogActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"></activity>

(I think the android:label="@string/app_name" part isn't necesary but i just left it there just in case).

After changing this, the Facebook login alert appears over the app and i have no more problems with the Galaxy S4 as I had before :)

cddin commented 10 years ago

best!!