Вопрос

I want to implement a "10 day trial status" on my application. I found this post that was made back in 2009 (I like the 3rd methos). Has anything changed in this area since 2009? Is there a better way? Post link... Creating an Android trial application that expires after a fixed time period

thanks, Gary

Это было полезно?

Решение

The best way to do this would be to set up a MySQL database on your server and store the time and date of the installation and the device ID in it. So every time the user opens your app you check with your server how long the device is already running the app. You could do this or if you don't want to get involved in server side programming you could just create a local SQLite database and do the same(then of corse you won't have to save the device ID). However this is not so safe because the user can access your database if his/her device is rooted. Therefore if you're choosing this way I'd recommend using SQLCipher for Android. It encrypts your database.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top