Set datetime SKORPIO X5

hello,
I would like to set date and time in the code but it returns a permissions error.
I ask if there is a function in the android sdk that allows you to do this.
Thank you.

1 Like

You can use DevicePolicyManager  |  Android Developers.
But your app has to be device owner app or profile owner app.

2 Likes

Hi @Daniel_Marino,

Date and time is a sensitive data and Android protects them with restrictions.
Set date and time requires a special permission which as per documentation “Not for use by third-party applications.” ( link) and following the documentation posted by @Richard_Venderbosch only a “device owner” can do it.

In our SDK (at the time of writing the latest version is 1.31) there is no method that allows you to set date and time.

For more specific questions, I suggest to get in touch directly with our Technical Support Service by opening a request through the linked form.

1 Like

Isn’t it easier just to configure a (local) ntp server? That way the terminal synchronizes the time itself. Datalogic Oemconfig/ Scan2Deploy Studio and also the AEQR page has options to configure an ntm server.

2 Likes