ibm-bluemix-mobile-services / bms-clientsdk-android-push

Android Push notifications SDK for IBM Cloud Mobile Services
Apache License 2.0
10 stars 12 forks source link

getSenderIdFromServerAndRegisterInBackground response #68

Closed SebastianSingle99 closed 7 years ago

SebastianSingle99 commented 7 years ago

I'm trying to register a device via registerDeviceWithUserId(deviceId, new MFPPushResponseListener<String>() {... The class MFPPushInvoker receives the correct senderId in itsonSuccess listener. But afterwards the listener in getSenderIdFromServerAndRegisterInBackground receivces an empty response-object and the complete register-process has failed. Any ideas?

AnanthaKrish commented 7 years ago

Did you configure FCM Cloud messaging credentials ?

SebastianSingle99 commented 7 years ago

yes. The problem is in class MFPPushInvoker.

@Override

public void onSuccess(Response response) { logger.debug("MFPPushInvoker.onSuccess() - Success response in invoker is: "+ response.toString()); responseListener.onSuccess(response); }

The response gets logged here and afterwards the response is null, because you can call methods like getResponseText or getResponseJSON just once as documented in the Response class.

AnanthaKrish commented 7 years ago

@SebastianSingle99 add the following in build.gradle(Module:app)

  compile 'com.ibm.mobilefirstplatform.clientsdk.android:core:2.2.7'
SebastianSingle99 commented 7 years ago

This doesn't solve the problem. At the moment i have to include this lib as local module and comment out the log-statement and everything works.

AnanthaKrish commented 7 years ago

We will give the fix soon @SebastianSingle99