I am currently implementing a push notification feature on my project. I managed to use xtify for doing this since it is a good wrapper for interacting with Google's C2DM services.
Now, as most of you probably know : xtify uses an identifier called xid to communicate and push notification to users. So in my main activity (the first displayed when the user opens the app), I have the following code :
XtifySDK.start(getApplicationContext(), Constants.XTIFY_APP_KEY,
Constants.C2DM_SENDER_ID);
String xid = XtifySDK.getXidKey(getApplicationContext());
if (!"".equals(xid) && xid != null) {
App.setXid(xid);
}
now my questions are :
- Is the xid permanently attached to the device ? or Is it possible to change/revoke it ?
Should I store it in the database then (with the user info) ? and check each time the user connects whether he/she already has an associated xid and if not, call
String xid = XtifySDK.getXidKey(getApplicationContext());
to generate a new one ? - Is there a way for the android emulator to get notifications ?
thanks in advance guys,