Hi
I have successfully implemented my boradcastreceiver that is working just the way i want to. But I want to know why it stops receiving after the device is rebooted? I have to open application manually to make it work.
My code is like this
...........................
other needed permissions
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
.........................
<receiver
android:name="..MyPushReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.okwork" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
............................................
public class MyPushReceiver extends BackendlessBroadcastReceiver {
@Override
public boolean onMessage(Context context, Intent intent) {
String message = intent.getStringExtra("message");
// working fine..............
}