Closed ignacio-chiazzo closed 7 years ago
Hi,
You can use getPushToken
for this purpose - it returns a stored token value for a device; if a returned value is null
or ""
then a device is not registered, otherwise a token will be returned.
Does this functionality cover your needs?
First of all, I would like to have a mechanism to see if the device was registered successfully, I only found two solutions. The first one is with the function
getPushToken
, the second one is with the functionlistDevices
and then see if my device is on the list (not nice solution :/).Related to the first solution I found the following issue :
getPushToken && getPushwooshHWID
should be functions that have the two types of callbacks (success and error). In the case that the token is not registered or something happened- (void)getPushToken:(CDVInvokedUrlCommand *)command { NSString *token = [[PushNotificationManager pushManager] getPushToken]; CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:token]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; }
Let me know if there is another way to check if the device was registered successfully, or any update of those two functions
NOTE: I want to know if the device is registered after the device (too much later) was registered.