11

Is there a way to get the Android device activation DateTime? I need to know when the android device first startup date or first-time user insert SIM card or from the hardware or the file System

I checked this link and other suggestions and it's not working and if this data cannot be detected, is there other possibilities to get the SIM slot first configured?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Wael Abo-Aishah
  • 942
  • 2
  • 10
  • 27
  • 1
    This answer https://android.stackexchange.com/a/59252/154969 suggest to retrieve this data based on when device has been used with user Google account (this is merely a clue to your problem and will be not 100% sure). I searched for some Google API, but I found only this https://developers.google.com/android/reference/com/google/android/gms/auth/api/signin/package-summary#top_of_page . I think that this is not possible. – JJ86 Oct 18 '17 at 09:21
  • @JJ86 Thanks for your suggestions, but as you are saying I need solution or workaround to get 100% accurate results or multi solutions to have good results, and I am trying to communicate telecommunication providers at (the covered country) if they can provide exported API for this functionality – Wael Abo-Aishah Oct 19 '17 at 09:03
  • I think you have to determine what happened when the device opened for first time? , and i think that behavior changing from company to other, every company use android source on it's own, so i suggest to connect with those company and ask them for that. Also if there is API or something like that it would be from the partner company. –  Oct 23 '17 at 06:10

2 Answers2

3

Assuming the user had their data on the first day they used their device or inserted the sim, you can use the NetworkStatsManager to get the user's historical data usage to find the oldest date for data usage for that sim. Look at this question on how to do that. PS, you can only do this on android 23 and up. For pre-android 23 devices, your app has to be a system app in order to access the historical data.

Otherwise I don't think there is any other way to get a close proximity of when the device was activated.

EDIT 1 For pre-android 23 you can try and get the internet configuration messages. Carriers usually send configuration messages when a user inserts a sim on their phone for the first time. You can look at the configuration messages dates and find the oldest. I don't whether this solution will be available as not all carriers send configuration messages

Niza Siwale
  • 2,390
  • 1
  • 18
  • 20
1

From the Service menu on your phone see the total call time which is very hard to reset. By that, you can assume how long it has been used.

With the current features of Android, that is the best you can get.

Here I assume it is your phone and a google account was created during activation of the phone, being said, I would try to go into the google account(Dashboard) and look when the device was added. This is the date when the device was registered.

Nesan Mano
  • 1,892
  • 2
  • 26
  • 43