Push Messages would not receive after rebooting device.

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" >
            &lt;intent-filter&gt;
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />


                &lt;category android:name=&quot;com.example.okwork&quot; /&gt;
            &lt;/intent-filter&gt;
            &lt;intent-filter&gt;
                <action android:name="android.intent.action.BOOT_COMPLETED" />


                &lt;category android:name=&quot;android.intent.category.DEFAULT&quot; /&gt;


                <action android:name="android.intent.action.QUICKBOOT_POWERON" />
            &lt;/intent-filter&gt;
        &lt;/receiver&gt;


............................................



public class MyPushReceiver extends BackendlessBroadcastReceiver {



@Override
	public boolean onMessage(Context context, Intent intent) {
		String message = intent.getStringExtra("message");
// working fine..............
}



Hi Muhammad,

Thanks for reporting, we’re investigating the described issue. We shall prepare a tested sample which you will be able to compare with your code and better localize the problem.
For reference, the task ID is BKNDLSS-13216.

Thanks, :slight_smile:
I look forward to it.

Thanks, :slight_smile:
I look forward to it.

Meanwhile i saw on GitHub, onReceive Method in BackendlessBroadcastReceiver is synchronized. (I am not that expert in this case).
My Guess is that onReceive Method in BackendlessBroadcastReceiver should have this implementation that it will start service once it receives Boot_Complete from intent.

Hi @Muhhamad,
We did not reproduce the issue. After reboot phone was able to receive pushes.
Please look at the push sample as example of correct handling of GCM in Backendless

Regards, Artur

Thanks.

I’ll look into it.