Hello,
with Backendless 4.0 I can’t get device registration to work. For testing device registration I’ve used the downloaded sample project and did all steps from the documentation:
changed manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="my.package.name.permission.C2D_MESSAGE"/>
<permission android:name="my.package.name.permission.C2D_MESSAGE"
android:protectionLevel="signature"/>
<receiver android:name="com.backendless.push.BackendlessBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="my.package.name"/>
</intent-filter>
</receiver>
<service android:name="com.backendless.push.BackendlessPushService" />
And inside my main activity
Backendless.Messaging.registerDevice("GCM-Sender-ID", "default", new AsyncCallback<Void>() {
@Override
public void handleResponse(Void response) {
Log.d("TESTAPP", "WORKS");
}
@Override
public void handleFault(BackendlessFault fault) {
Log.d("TESTAPP", "ERROR: "+fault.getMessage()+" "+fault.getCode());
}
});
I get an error on application start with the following message:
No receivers for action com.google.android.c2dm.intent.REGISTRATION IllegalArgumentException
Did I miss something? According to some entries on google c2dm.intent.REGISTRATION should be deprecated…
Thank you,
Michael