title: Android, How to check trial period of application is expired?
body: <p>There are several packages in my application that user can select each one according to different prices. In server side I store some information of client such as device Id, Android Id and etc.</p>
  
  <p>Based on the package that user choose, for example user has chosen 2 hours plan, server sends me Expire time and I store it in local database.</p>
  
  <p>The question is what is the best way to check that is trial period expired? If user buy 2 hour plan at 12:00, therefore expire time will be at 14:00. I store 14:00 in database and each time application lunched, I check the data base. But the issue is if we assuming that user is using the application how to close application or prompt user that the plan has expired? How do I understand if time of handset is changed by user?</p>
  
  <p>Is use of services best way? what things do you suggest?</p>
  
  <p>==============
  <strong>Update:</strong></p>
  
  <p>The point that I forgot to say is, because of some restrictions in our office I have access just to three activities that I'm designing and I can't ask other developers who are working on this project, check this and check that or use this variable. But because I'm working on main activity, this activity is the only activity that has access to database.  </p>