1

I'm following the instructions as the Getting Started section for Xtify notifications doing the following:

Context myAppContext = getApplicationContext();

XtifySDK.start(myAppContext , MyApp.XTIFY_APP_KEY, MyApp.SENDER_ID);
String xid = XtifySDK.getXidKey(myAppContext);

if(!"".equals(xid) && xid != null) {
...
}

And I realised that when I register for the first time, it returned the Xid, but if I uninstall and deploy again using Eclipse It returns null in XtifySDK.getXidKey() instruction.

The app target is build using Google APIs 4.0 (level 14).

I'd thank and appreciate your help in this guys.

slugster
  • 49,403
  • 14
  • 95
  • 145

2 Answers2

0

Perhaps you're asking for it too quickly. It would be better to place the request for the xid in the onRegistered callback method within the XtifyNotifier class.

Michael Bordash
  • 1,072
  • 1
  • 10
  • 20
  • Hi thanks for the answer but no, I've put that code into onRegistered(Context arg0) method within the XtifyNotifier and the result is still the same. – user2362487 May 16 '13 at 17:30
  • does this same behavior exist in the sample app included in the SDK? that's a known working app. If it's working in there, then you might want to compare how the sample app works vs your custom integration. – Michael Bordash May 16 '13 at 22:50
  • I just built the gcm sample app included in the SDK using Eclipse and couldn't replicate your issue. I installed the sample app on my device, received an XID, sent a test push, uninstalled the app, reinstalled it, received an XID, sent a test push. – Michael Bordash May 16 '13 at 23:04
  • Hi, I've tried both applications in different phones, one it works (first time returns null, then execute again and it returns the xid. This is a Samsung Galaxy mini Android 2.2) but in the other returns always null (Vodafone Smart II Android 2.3). Probably this can be something about the phone – user2362487 May 17 '13 at 09:11
  • I've uninstalled the app from the phone where was working, installed again (without code changes) and now it returns always null. Do you know if there is some kind of limit of registrations? From what I know if the app is registered the instruction XtifyNotifier.getXidkey returns the same registered XID independently of the number of calls, if not returns null but in the next call will generate a new XID. – user2362487 May 20 '13 at 13:40
0

It was solved for a while which the reason was a gmail account wasn't configured in the phone. But after 3 months working well it returns always null now. I've tested the sample application and it doesn't work too (I hadn't change none of two before).

Meanwhile I noticed the sdk was updated (I was using the 2.3 and updated to the last one 2.3.2.1). I followed the instructions since the beginning (including the registration of a new gcm application in google and in xtify console) but it returns always null too (even in the sample). Did someone have this issue too?