Im trying to develop a cross platform application which will receive push notifications from Amazon SNS. The push notifications are working just fine for iOS, but for Android, im kind of at cross roads currently.
The push notifications are viewable when the Android App is focussed. However, no matter what variables related to ti.cloudpush i set(listed below).
The issue is - i am not able to get the push notifications to be shown in the notification tray.
CloudPush.showAppOnTrayClick = true;
CloudPush.showTrayNotification = true;
CloudPush.showTrayNotificationsWhenFocused= false;
CloudPush.singleCallback = true;
I guess this is related to Permissions that i might have to set iin the tiapp.xml for the Android Manifest section. I have included the list of permissions currently used below -
<android xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk>14</uses-sdk>>
<manifest>
<uses-sdk android:minSdkVersion="14"/>
<permission android:name="com.test.push.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="com.test.push.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application>
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<!-- Start receiver on boot -->
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.intent.action.USER_PRESENT"/>
<category android:name="android.intent.category.HOME"/>
</intent-filter>
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.test.push"/>
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="com.test.push.permission"/>
</intent-filter>
</receiver>
</application>
</manifest>
</android>
Could someone please let me know what i am doing wrong/ How to get this right ?
Any information/permissions related link would be highly appreciated.