Backendless Support
 
Works as Designed

Dissappear some devices on devices list messaging

hi dear

some devices on my device list have dissappeared.Before i have about 30 devices here but now it only have 8 devices

irI2r0F

Leave a Comment

Comments (22)

photo
1

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.

photo
1

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 ?

photo
1

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

photo
1

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

photo
1

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.

photo
1

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

photo
1

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 ?

photo
1

Provide me just your application ID, please.

photo
1

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

photo
1

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

photo
1

I mean your Backendless Application ID.

photo
1

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.

photo
1

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];

}

photo
1

Is there a solution to recover expired registration?

photo
1

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

photo
1

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 ?

photo
1

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.

photo
1

OK thanx.

photo
1

Do u know what code to add to put no expiration date ? (or larger like 10000 days)

photo
photo
1

Hi,

i can set in the registerDevice a long expiration date? For example between more years?

This is my code:

Calendar cal = Calendar.getInstance();

cal.set(2100, Calendar.DECEMBER, 31);

Date expiration = cal.getTime();

Backendless.Messaging.registerDevice(getResources().getString(R.string.SENDER_ID),

channels,

expiration,

new AsyncCallback<Void>() {

@Override

public void handleResponse(Void aVoid) {

System.out.println("registerDevice: OK");

}

@Override

public void handleFault(BackendlessFault backendlessFault) {

System.out.println("registerDevice: ERRORE");

}

});

But have always the same problem that after 2 days there isn't the device in the list.

Thanks for your support!

photo
1

Hi Mirko,

I've created the internal ticket to investigate this issue (BKNDLSS-13734)

We will let you know about results here.

Regards, Ilya

photo