Good day!
I'm having trouble with android push notifications.
I've installed the playfab Android push plugin and had to modify the manifest because I have more than one android plugin in the project.
Every thing works fine:
1) Init OK (tokens and everything)
2) register for push OK
BUT I can only receive the push notification ingame.
Whenever I set PlayFabAndroidPlugin.UpdateRouting(true) (because I want to see it in the notification bar) I just don't get any message (not even in debug.logs).
Any help or ideas?
My modified manifest is as follows:
Kind regards!
<?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:versionCode="1" android:versionName="1.0"> <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" /> <permission android:name="com.unity3d.player.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <!-- //Change to your package name .permission.C2D_MESSAGE --> <uses-permission android:name="com.unity3d.player.permission.C2D_MESSAGE" /> <!-- //Change to your package name .permission.C2D_MESSAGE --> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="com.android.vending.BILLING" /> <!-- Android GCM Plugin --> <application android:theme="@style/UnityThemeSelector" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true"> <!-- Unity Activities --> <activity android:name="com.unity3d.player.UnityPlayerProxyActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="com.unity3d.player.UnityPlayerActivity" 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.unity3d.player.UnityPlayerNativeActivity" 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="android.app.lib_name" android:value="unity" /> <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" /> </activity> <!-- End Unity Activities --> <!-- Begin GCM --> <receiver android:name="com.google.android.gms.gcm.GcmReceiver" android:permission="com.google.android.c2dm.permission.SEND" > <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <!-- for Gingerbread GSF backward compat --> <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> <category android:name="com.unity3d.player" /> <!-- //Change to your package name --> </intent-filter> </receiver> <service android:name="com.playfab.unityplugin.GCM.PlayFabGcmListenerService" android:exported="false"> <intent-filter> <action android:name="com.google.android.c2dm.intent.RECEIVE" /> <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> </intent-filter> </service> <service android:name="com.playfab.unityplugin.GCM.PlayFabInstanceIDListenerService" android:exported="false"> <intent-filter> <action android:name="com.google.android.gms.iid.InstanceID"/> </intent-filter> </service> <service android:name="com.playfab.unityplugin.GCM.PlayFabRegistrationIntentService" android:exported="false"> </service> <service android:name="com.playfab.unityplugin.PlayFabUnityAndroidPlugin" android:exported="false" android:stopWithTask="true"> </service> <!--<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />--> <!-- End GCM --> <!-- Begin IAP --> <!-- End IAP --> <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" /> <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" /> <activity android:name="com.facebook.unity.FBUnityGameRequestActivity" /> <activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" /> <activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" /> <activity android:name="com.facebook.unity.AppInviteDialogActivity" /> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb1234554429917577" /> <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider1234554429917577" android:exported="true" /> </application> </manifest>