Maybe somebody here can help me with my push notifications. I’m using the plugin/service from Onesignal and setup my programm as instructed.
It mostly seems to work fine, the device get registered with their servers, no error messages. But when the device receives a push notification it’s not displayed on the phone. The only thing I get is I/GCM(3350): GCM message com.rachor.cthulhu 0:1434822732224445%77521151f9fd7ecd when the app is running or
06-20 17:43:50.131: I/GCM(3350): GCM message com.rachor.cthulhu 0:1434815030418529%77521151f9fd7ecd
06-20 17:43:50.196: W/GCM-DMM(3350): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.rachor.cthulhu (has extras) }
when the app was shut down. But no actual notification is shown. I’ve re-checked the Manifest a 1000 times but couldn’t find any errors there.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.rachor.cthulhu" 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" />
<application
android:icon="@drawable/app_icon"
android:label="@string/app_name">
<activity
android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
<receiver
android:name="com.onesignal.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.rachor.cthulhu" />
</intent-filter>
</receiver>
<meta-data android:name="billing.service" android:value="google.GooglePlayIabService" />
<activity android:name="com.soomla.store.billing.google.GooglePlayIabService$IabActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
</application>
<!--<uses-feature android:glEsVersion="0x00020000" />-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--library-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.VIBRATE" />
<permission android:name="com.rachor.cthulhu.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.rachor.cthulhu.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
</manifest>