device Id expiration

How can I register a device to send push notification that never expire?

Hi Jorge,

Please be more verbose. What exactly should never expire and how do you know it expires?

Sorry, speak english is nor easy for me. When you register a device to send push notification a expiration date appear by default. I register a device today and it expires two days (1461832871000 in timeStamp). I tried to use the register device function puting null in date place when I call it )Backendless.Messaging.registerDevice(Defaults.GOOGLE_PROJECT_ID, channels, null, new AsyncCallback<Void>() {…) But always appear that the device will expired in two days. That appear in the message management in my app. I want to register a device without a expiration date. How can I do that?

Thank you for yout answer.

Hi Jorge,

Thanks for explaining!
You can’t omit expiration date, but you can assign a date which is more than 2 days from now.
But remember that this way is less reliable, because Google itself may consider the subscription obsolete at some time and cancel it. So we recommend putting the registerDevice() code into onCreate() method or something like that, in order to often renew the subscription. You may be sure that repeatedly calling registerDevice() won’t break anything, it will just renew the expiration date.

I did that but only when user was registering and google cancel it when two or three days passed, I didnt know that. I’m going to put the register device function into onCreate’s login like you said, that shold works. Thank you for your quickly answer