Reputation: 54949
While registering the Device with Pushbots i am not able to send the alias value to the server. The logs show it is sending the alias but when I check the list of the devices it does not show the alias value registered.
I am using this after initializing the Pushbots
Pushbots.sharedInstance().init(this);
Pushbots.sharedInstance().setAlias("john");
Is there any way to debug to know what data is being sent to register the device with Pushbots?
Logs:
05-10 14:55:47.785: I/PB2(673): PUT Request : https://api.pushbots.com/alias
05-10 14:55:47.786: I/PB2(673): Body builder msg original ; {"token":"","platform":"1","alias":"john"}
05-10 14:55:48.241: I/PB2(673): PUT Request : https://api.pushbots.com/register
05-10 14:55:48.241: I/PB2(673): Body builder msg original ; {"token":"APA91bFD1F6tYSTklUYTPRUQQQDSbmfTjMZK4jTxFxBCZtshH4IpPCakBUpN-JycSdPVj2sTJfYsKNcYpkwptvWo4Zn0H7MjM3MfJXO_Y7RCkqOPh3uxRzTZQSxUgKpJ72benHZJvYZ4","udid":"545422864f376713","tz":"Asia/Calcutta","platform":"1","carrier":"Vodafone IN","osVersion":"5.0.2","device":"XT1033","resolution":"1184x720","locale":"en_US","lib":"2.0.13","locale":"en_US","country":"in"}
Upvotes: 0
Views: 791
Reputation: 1
The setAlias
functionality should be linked to a certain activity the user performs, it doesn't make much sense to give one marker for all users.
The reason this is not working is that you use the method directly after the initialization which takes time to register the device. So in essence, if your app has a login activity for example, The setAlias method should be invoked AFTER a successful login from your user, not in the main activity.
Upvotes: 0