mobileGetDeviceToken

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
mobileGetDeviceToken()
Synonymsiphonegetdevicetoken
Summary

Returns the Device Token used for Push Notification.

Introduced5.5
OSios, android
Platformsmobile
Example
on pushNotificationRegistered
   get mobileGetDeviceToken()
end pushNotificationRegistered
Values
NameTypeDescription
return

The mobileGetDeviceToken function returns a base 64 encoded representation of 32 byte of binary data that makes up the Device Token.

RelatedMessage: pushNotificationRegistrationError, pushNotificationRegistered, pushNotificationReceived
Glossary: message
Description

Use the mobileGetDeviceToken function to return the Device Token that is used by the Push Notification Server to identify to which device to send a notification.

LiveCode registers for push notifications with the operating system when your application starts. The operating system sends a callback message pushNotificationRegistered to your application once registration is complete.

Important: The mobileGetDeviceToken function returns empty until registration for push notifications with the operating system is complete.

As a result, the mobileGetDeviceToken function should be called when you handle the pushNotificationRegistered message.