vuforia插件和Facebook的prime31插件之间的冲突对Android的统一 [英] Conflict between vuforia plugin and prime31 facebook plugin for android on unity

查看:643
本文介绍了vuforia插件和Facebook的prime31插件之间的冲突对Android的统一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

真正紧急的客户需要这些天。 T_T

我在团结Android应用都vuforia插件和Facebook的prime31插件。困难在于在AndroidManifest.xml文件。他们都采取MAIN和LAUNCHER activites的作用。但是,在API,似乎一会始终覆盖等。反正是有让他们一起工作?有些人已经张贴这个问题在网上,但没有有效的方法存在。真的AP preciate你的帮助!! ~~

我的Andr​​oidManifest.xml是如下:

 <?XML版本=1.0编码=UTF-8&GT?;
<清单
    的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    包=com.unity3d.player
    安卓的installLocation =preferExternal
    机器人:主题=@安卓风格/ Theme.NoTitleBar
    安卓版code =1
    机器人:=的versionName1.0>
    <使用特征的android:NAME =android.hardware.camera/>
    <支持屏
        机器人:smallScreens =真
        机器人:normalScreens =真
        机器人:largeScreens =真
        机器人:xlargeScreens =真
        机器人:anyDensity =真/>
    <使用许可权的android:NAME =android.permission.CAMERA/>
    <应用
        机器人:图标=@绘制/ app_icon
        机器人:标签=@字符串/ APP_NAME
        机器人:可调试=真正的>
        <活动机器人:名字=com.prime31.UnityPlayerProxyActivity机器人:screenOrientation =画像
                  机器人:launchMode =singleTask
                  机器人:标签=@字符串/ APP_NAME
                  机器人:taskAffinity =com.prime31.UnityPlayerProxyActivity
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\"
                  >
            &所述;意图滤光器>
                <作用机器人:名字=com.prime31.UnityPlayerProxyActivity/>
                <作用机器人:名字=android.intent.action.MAIN/>
                <类机器人:名字=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;
        <活动机器人:名字=com.prime31.UnityPlayerActivity机器人:screenOrientation =画像
                  机器人:launchMode =singleTask
                  机器人:标签=@字符串/ APP_NAME
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">
        < /活性GT;
        <活动机器人:名字=com.prime31.UnityPlayerNativeActivity机器人:screenOrientation =画像
                  机器人:launchMode =singleTask
                  机器人:标签=@字符串/ APP_NAME
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">
            <元数据机器人:名字=unityplayer.ForwardNativeEventsToDalvik机器人:值=真/>
        < /活性GT;            <活动机器人:名字=com.prime31.EtceteraProxyActivity机器人:configChanges =方向|屏幕布置|屏幕尺寸| smallestScreenSize>< /活性GT;
            <活动机器人:名字=com.prime31.WebViewActivity机器人:configChanges =keyboardHidden |方向
    >< /活性GT;
        <活动机器人:名字=com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity
                  机器人:标签=@字符串/ APP_NAME
                  机器人:screenOrientation =画像
                  机器人:taskAffinity =com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\"
                  >
                    &所述;意图滤光器>
                        <作用机器人:名字=com.qualcomm.QCARUnityPlayer.QCARPlayerProxyActivity/>
                        <作用机器人:名字=android.intent.action.MAIN/>
                        <类机器人:名字=android.intent.category.DEFAULT/>
                    &所述; /意图滤光器>
        < /活性GT;
        <活动机器人:名字=com.qualcomm.QCARUnityPlayer.QCARPlayerActivity
                  机器人:标签=@字符串/ APP_NAME
                  机器人:screenOrientation =画像
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">
        < /活性GT;
        <活动机器人:名字=com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity
                  机器人:标签=@字符串/ APP_NAME
                  机器人:screenOrientation =画像
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">
            <元数据机器人:名字=android.app.lib_name机器人:值=团结/>
            <元数据机器人:名字=unityplayer.ForwardNativeEventsToDalvik机器人:值=FALSE/>
        < /活性GT;
        <活动机器人:名字=com.unity3d.player.VideoPlayer
                  机器人:标签=@字符串/ APP_NAME
                  机器人:screenOrientation =画像
                  android:configChanges=\"fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen\">
        < /活性GT;
            <活动机器人:名字=com.prime31.P31VideoPlayerActivity机器人:configChanges =键盘| keyboardHidden |方向>< /活性GT;
            <接收机器人:名字=com.prime31.AlarmManagerReceiver>< /接收器>
            <活动机器人:名字=com.flurry.android.FlurryFullscreenTakeoverActivity机器人:configChanges =键盘| keyboardHidden |方向|屏幕布置| uiMode/>
            <活动机器人:名字=com.facebook.LoginActivity>< /活性GT;
            <元数据机器人:名字=com.facebook.sdk.ApplicationId机器人:值=\\ 393271930801839/>        <元数据机器人:名字=com.prime31.FlurryPlugin机器人:值=UnityPlayerActivityProxy/>
        <元数据机器人:名字=com.prime31.FacebookPlugin机器人:值=UnityPlayerActivityProxy/>
< /用途>        <使用许可权的android:NAME =android.permission.INTERNET对/>
        <使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAG​​E/>
        <使用许可权的android:NAME =android.permission.GET_TASKS/>
            <使用许可权的android:NAME =android.permission.INTERNET对/>
            <使用许可权的android:NAME =android.permission.READ_PHONE_STATE/>
            <使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAG​​E/>< /清单>


解决方案

有是这样做的没有简单的方法。您将有事物的Java方面染指。

下面的URL应该帮你出这

<一个href=\"https://gist.github.com/prime31/0908e6100d7e228f1add/raw/a5d96177c8d8fde548068d2a15de49acdb2023ec/Android+Activity+Sharing\" rel=\"nofollow\">https://gist.github.com/prime31/0908e6100d7e228f1add/raw/a5d96177c8d8fde548068d2a15de49acdb2023ec/Android+Activity+Sharing

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

这篇关于vuforia插件和Facebook的prime31插件之间的冲突对Android的统一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆