How to work with Facebook SDK for Unity and Vuforia for Android?
Asked Answered
O

1

0

I'm having a problem working with this two plugins together: on the AndroidManifest.xml both of them need to be "android.intent.category.LAUNCHER"

<application android:icon="@drawable/app_icon" android:label="@string/app_name"     android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:debuggable="false">
        <activity     android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity"     android:label="@string/app_name" android:screenOrientation="portrait"     android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientat    ion|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <meta-data android:name="android.app.lib_name" android:value="unity" />
            <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
    <activity android:name="com.unity3d.player.VideoPlayer" android:label="@string/app_name" android:screenOrientation="portrait" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    </activity>
    <activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation">
    </activity>
    <activity android:name="com.facebook.unity.FBUnityPlayerActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
        <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    </activity>
    <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 273811112771671" />
</application>

Is there any solution available for this trouble? I think it's very common.

Odds answered 5/1, 2014 at 0:55 Comment(0)
F
1

We have a Beta version of v5.0.2 of the SDK to try to address this issue: https://developers.facebook.com/docs/unity/downloads/

Basically we deprecated requiring FBUnityPlayerActivity to be the main activity. This should allow you to use whatever main activity you like.

It's still in beta as we're working out the kinks. If you still have the old version of the Facebook SDK on your project, after importing this go to "Facebook->Edit Settings" then inside the "Android Build Settings" tab, click "Regenerate Android Manifest". That should modify it with the new facebook activities. You should then be free to modify your AndroidManifest.xml to make Vuforia your main activity.

Fake answered 22/1, 2014 at 21:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.