I found the following problems with the Android SDK version : Backendless SDK v1.10 for Android, released 08.11.2014.
BUG 1:
void registerDevice( String GCMSenderID, List<String> channels, Date expiration )
No exception occurs but checking in the console there’s nothing registered.
BUG TEST CODE :
final String GCMSenderID = “929309203937”;
final String channel = “unittest”;
List<String> channels = new ArrayList<String>();
channels.add(channel);
Calendar calendar = Calendar.getInstance(Locale.US);
calendar.add(Calendar.DAY_OF_MONTH, 2);
Date expiration = calendar.getTime();
Backendless.Messaging.registerDevice(GCMSenderID, channels, expiration);
BUG2 :
void registerDevice( final String GCMSenderID, final List<String> channels, final Date expiration, final AsyncCallback<Void> callback )
Get the following exception everytime we call the API.
BackendlessFault{ code: ‘IllegalArgumentException’, message; ‘java.lang.Object[] cannot be cast to java.lang.String[]’ }
BUG TEST CODE :
final String GCMSenderID = “929309203937”;
final String channel = “unittest”;
List<String> channels = new ArrayList<String>();
channels.add(channel);
Calendar calendar = Calendar.getInstance(Locale.US);
calendar.add(Calendar.DAY_OF_MONTH, 2);
Date expiration = calendar.getTime();
Backendless.Messaging.registerDevice(GCMSenderID, channels, expiration,
new AsyncCallback<Void>() {
@Override
public void handleResponse(Void response) {
}
@Override
public void handleFault(BackendlessFault fault) {
Log.e(TAG, fault.toString());
}
});
BUG 3 :
Setup the channel -> registerDevice() invoke -> check in the console that the device is registered in the channel.
But getRegistrations() returns a DeviceRegistration with empty channel info.
DeviceRegistration getRegistrations() throws BackendlessException
void getRegistrations( AsyncCallback<DeviceRegistration> responder )
Both sync and async APIs can’t get the channel info.
BUG TEST CODE :
final String GCMSenderID = “929309203937”;
final String channel = “unittest”;
Backendless.Messaging.registerDevice(GCMSenderID, channel);
// After invoking registerDevice(), it can take a while so we try 5 times at an interval of 1000ms
DeviceRegistration deviceRegistration = Backendless.Messaging.getRegistrations();
//deviceRegistration.getChannels() size is 0