Push Notifications, Urban Airship, Appcelerator Blog Post
I followed the instructions in the blog post. only problem is that e.deviceToken is TIBlob, not a string.
any thoughts? any way to index into TIBlob and get the string/text/value?
e.deviceToken is [object TiBlob]
e.deviceToken.text is null
e.deviceToken.value is undefined
Yeah, these push notifications with urban airship are dead in the water until we can get this TiBlob thing worked out.
It appears the the object "e" sent to successCallback(e) for Titanium.Network.registerForPushNotifications returns this:
{
deviceToken = "[object TiBlob]";
source = "[object NetworkModule]";
type = remote;
}
until deviceToken equals a string, there won't be any push notifications!!! how do we get the device token out of that TiBlog thing??
4 Answers
-
ANSWER
Use
var deviceToken=Ti.Network.remoteDeviceUUID
instead of using
e.deviceToken
-
What does e.deviceToken.type return?
-
Just an FYI: This issue (e.deviceToken being a TiBlob rather than a string) seems not to exist in the released 1.4.2.
-
An alternative is to set an alias when registrations happen and set the alias to something that is a unique string like: Titanium.Platform.id
Has anyone figured out how to set any tags or aliases with urban airship? From the docs it looks like you need to pass some JSON in the post?