Support Topics Documentation Slack YouTube Blog

Dissappear some devices on devices list messaging


(AnthonyDonkeez) #1

hi dear
some devices on my device list have dissappeared.Before i have about 30 devices here but now it only have 8 devices
http://i.imgur.com/irI2r0F.png</img>


(Sergey Chupov) #2

Hi Anthony,

The provider may expire the device registrations after some time. This is why we recommend registering it more frequently, for example each time the app is started.


(AnthonyDonkeez) #3

Hi there. Thx for the answer. I don’t really understand… I had around 32 devices, then refresh the page, then only 7 ! Those 25 disappear devices still in our users data base. And those 25 users did not subscribe all at the same time. And the app is on app store just few days ago… How to bring these devices back ? Can u explain ?


(AnthonyDonkeez) #4

I’m sorry guyz it’s real emergency as we cant send notification right now :frowning: Thanx a lot for your fast answer.


(Sergey Chupov) #5

How did you register those devices? Does your app contain a registerDevice() call and if yes, where?


(AnthonyDonkeez) #6

When users turn on app for first time, it ask about “do u want to get notifs” classic message. And all these users have said yes.


(Sergey Chupov) #7

So you register their devices only one time when they first click “Yes I want to get notifications”?


(AnthonyDonkeez) #8

I don’t really know because my dev is coming in few hours. Could u help if i give u access to my backendless account ?


(Sergey Chupov) #9

Provide me just your application ID, please.


(Sergey Chupov) #10

Just to make sure - when you call registerDevice(), do you pass an expiration date?


(AnthonyDonkeez) #11

App ID ? OK. https://itunes.apple.com/us/app/donkeez/id1148625354?l=fr&ls=1&mt=8


(AnthonyDonkeez) #12

My dev said “when app runs, the device is registerd in each time”


(Sergey Chupov) #13

I mean your Backendless Application ID.


(Sergey Chupov) #14

The default device registration expiration is 2 days from the moment of the registration. In your code, you may set it to a longer period when calling registerDevice().

So I suppose that part of your users just haven’t opened the app for two days, thus their device registrations have been expired.


(Xiaomingming) #15

I have used this code

  • (void)application:(UIApplication )app didRegisterForRemoteNotificationsWithDeviceToken:(NSData)deviceToken {

    NSString *deviceTokenStr = [backendless.messagingService deviceTokenAsString:deviceToken];

    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    @try {

          NSString *deviceRegistrationId = [backendless.messagingService registerDeviceToken:deviceTokenStr];
    
          kAppDelegate.deviceRegistrationID = [backendless.messaging currentDevice].deviceId ;
          [self userDeviceTokenUpdate];
    
      }
      @catch (Fault *fault) {
          NSLog(@"application:didRegisterForRemoteNotificationsWithDeviceToken: -> deviceRegistrationId: FAULT = %@", fault);
          
      }
    

    });

    [[NSNotificationCenter defaultCenter] postNotificationName:NOTI_DIDREGISTER_DEVICETOKEN object:nil];

}


(AnthonyDonkeez) #16

Is there a solution to recover expired registration?


(Sergey Chupov) #17

The users will appear again as soon as the registerDevice() method is called.


(AnthonyDonkeez) #18

OK so the mean is, the expired users will need to open the app again to come back to the devices notification list ? No other way to add them ?


(Sergey Chupov) #19

To be specific, the user need to call the registerDevice() method in order to appear in the list of devices. In your case they call this method when opening the app, so yes - you’re right, and there’s no way you can register their devices without having any physical access to them.


(AnthonyDonkeez) #20

OK thanx.