08-03-2010 04:45 AM
i've write a class which implement the phonelistener, but i would like to make a expiry date for my class. is it possible to write a thread which runs in the background and automatically check whether my application expired everyday without get in the apps?
08-03-2010 05:45 AM
Every running Thread has an owning Application. If the owning Application extends Application, and not UiApplication, and is also marked as a System Module, the user will have no easy way to find any indication that it is present.
Alternatively, you could check when the user actually uses the Application. You can initiate your Background processing to check at that time (assuming you have not already checked for that day).
08-03-2010 10:25 PM
Thanks for your advice.
i've try to use Date to compare the expiry date
when the user first run, i set the date to installDate
installDate = new Date()
i'd like to compare the time everytime when the user end the call,
so i have to get the date and time when user end a call.
but the problem is that:
how can I compare the time? after I get the long of the date object, but I don't know what will be the format look like...thanks.
08-04-2010 05:41 AM
Sorry I don't understand the question.
"what will be the format look like"
The API says:
"Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object."
If you wish to format this, you might like to look at SimpleDateFormat, Calendar and DateTimeUtilities.