I need help, because I am working with Parse Push Notification Android but my application just receives notifications in emulator but not receives in real devices.
In my analytics appears register.
This is my permission and BroadcastReceiver:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
android:name="org.example.promociones.permission.C2D_MESSAGE" />
<uses-permission android:name="org.example.promociones.permission.C2D_MESSAGE" />
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParseBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.USER_PRESENT" />
</intent-filter>
</receiver>
<receiver android:name="com.example.promociones.Receiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
And my code of registration:
Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
Parse.initialize(this, "SomeValue", "SomeValue");
ParseInstallation.getCurrentInstallation().saveInBackground();
ParsePush.subscribeInBackground("pruebas", new SaveCallback() {
@Override
public void done(com.parse.ParseException e) {
// TODO Auto-generated method stub
if(e!=null)
{
Log.d("com.parse.push", "La subscripcion al canal fue exitosa");
}
else
{
Log.e("com.parse.push", "Fallo la subscripcion push");
}
}
});
}