What is the easiest way to set a date limit until the application is used?

I would like to publish a beta version of my application, but I would like to set and end the date encoded in the code.

How can i make it easy? Is there an entry point that starts before any action?

+4
source share
2 answers

The "starting point" of an Android application before all actions will be Application.onCreate () . I would go for commenting on Sebi - check the date in Launcher Activity onCreate ().

+5
source

You can check the system date, as Seby said, and see if the user allows the date and time of the network to be updated. So the date is correct and you can find out if the period has expired:

http://developer.android.com/reference/android/provider/Settings.System.html#AUTO_TIME

+1
source

Source: https://habr.com/ru/post/1314706/


All Articles