0

I want to make checking about the current time of the server and check if my application passed that day , then the application should stop working

I made a research but I wasnt able to make it working as many examples I think they missing some thing

for example this post

Creating an Android trial application that expires after a fixed time period

I see it uses extends BaseMainActivity where is the "BaseMainActivity" so I can extend it !!

and how the checking for the date and time get should be done

and should I use alarm manager to check that server for the time ? or there is another better solutions

Community
  • 1
  • 1

1 Answers1

0

Looks like they're probably just using a custom class as the base activity. You could try changing it to simply Activity or ActionBarActivity if you're using the v7 support library.

Philio
  • 3,675
  • 1
  • 23
  • 33
  • ok , I have done that but how to start checking from the main activity if that isnt the main activity - I thought that I can use `checkExpiry()` but I found that another function call it - so how can I used that new class from the main activity? – Fast Solutions Nov 01 '14 at 19:29
  • Don't really follow what you mean. You could just make it the launcher activity? If you're using the example code you linked, it doesn't look like it's a complete solution and just grabs the current time for a URL. You really need to look at the correct answer and implement the third suggestion for a robust solution. – Philio Nov 01 '14 at 19:59
  • I want to use some thing to check the current time from server and make comparision , is there any sample for that ? – Fast Solutions Nov 01 '14 at 20:06