문제

Really emergent as client needs it these days. T_T

I have both vuforia plugin and prime31 facebook plugin in my android app on unity. The difficulty lies in the androidmanifest.xml file. Both of them take the role of MAIN and LAUNCHER activites. But in api, it seems one will always override the other. Is there anyway to make them work together ? Some people have already posted this issue online but no efficient method exists. Really appreciate your help !!~~

My AndroidManifest.xml is as the following:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.unity3d.player"
    android:installLocation="preferExternal"
    android:theme="@android:style/Theme.NoTitleBar"
    android:versionCode="1"
    android:versionName="1.0">
    <uses-feature android:name="android.hardware.camera" />
    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true"/>


    <uses-permission android:name="android.permission.CAMERA" />


    <application
        android:icon="@drawable/app_icon"
        android:label="@string/app_name"
        android:debuggable="true">
        <activity android:name="com.prime31.UnityPlayerProxyActivity" android:screenOrientation="portrait"
                  android:launchMode="singleTask"
                  android:label="@string/app_name"
                  android:taskAffinity="com.prime31.UnityPlayerProxyActivity"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                  >
            <intent-filter>
                <action android:name="com.prime31.UnityPlayerProxyActivity"/>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.prime31.UnityPlayerActivity" android:screenOrientation="portrait"
                  android:launchMode="singleTask"
                  android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
        </activity>
        <activity android:name="com.prime31.UnityPlayerNativeActivity" android:screenOrientation="portrait"
                  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="true" />
        </activity>

            <activity android:name="com.prime31.EtceteraProxyActivity" android:configChanges="orientation|screenLayout|screenSize|smallestScreenSize"></activity>
            <activity android:name="com.prime31.WebViewActivity" android:configChanges="keyboardHidden|orientation"
    ></activity>
        <activity android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait"
                  android:taskAffinity="com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
                  >
                    <intent-filter>
                        <action android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity"/>
                        <action android:name="android.intent.action.MAIN" />
                        <category android:name="android.intent.category.DEFAULT" />
                    </intent-filter>
        </activity>
        <activity android:name="com.qualcomm.QCARUnityPlayer.QCARPlayerActivity"
                  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.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity"
                  android:label="@string/app_name"
                  android:screenOrientation="portrait"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
            <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.prime31.P31VideoPlayerActivity" android:configChanges="keyboard|keyboardHidden|orientation"></activity>
            <receiver android:name="com.prime31.AlarmManagerReceiver"></receiver>
            <activity android:name="com.flurry.android.FlurryFullscreenTakeoverActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode"/>
            <activity android:name="com.facebook.LoginActivity"></activity>
            <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="\ 393271930801839"/>

        <meta-data android:name="com.prime31.FlurryPlugin" android:value="UnityPlayerActivityProxy"/>
        <meta-data android:name="com.prime31.FacebookPlugin" android:value="UnityPlayerActivityProxy"/>
</application>

        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.GET_TASKS"/>
            <uses-permission android:name="android.permission.INTERNET"/>
            <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
            <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

</manifest>
도움이 되었습니까?

해결책

There is no easy way of doing this. You will have to meddle with the java side of things.

The following url should help you out with this

https://gist.github.com/prime31/0908e6100d7e228f1add/raw/a5d96177c8d8fde548068d2a15de49acdb2023ec/Android+Activity+Sharing

다른 팁

You can find the unity-classes.jar from this path : Unity/Editor/Data/PlaybackEngines/androidplayer/bin

for reference please follow : http://forum.unity3d.com/threads/classes-jar-missing.250970/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top