android - One month restiction for application free use -


requirement:
in application want allow user free use features 1 month day of application's first run. have store first run date in application database , compare first run date current date every time when application launch.

implementation:
getting current date have several function calendar.getinstance(); date date=new date(); these function return date\datetime of standard "wall" clock (time , date). according document which can set user or phone network.

the problem:
every thing seems work fine if user change date setting , set past date. example user have first run application on 7 june 2013 after 6 july 2013 application must show have purchase subscription, if user change date of device 30 june etc. restriction not work.
there why implement correctly?
there why actual time of device not editable user?
edit:
application can work offline, user can turn off internet connectivity.

how storing 2 dates - date app first used , date last used. 30 minus difference between 2 dates give number of days remaining , if current date earlier last used date know have changed date back.

just idea - not tried in theory should work.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -