Created
March 13, 2015 11:33
-
-
Save aliab/ff540fc1080c87fe6f9c to your computer and use it in GitHub Desktop.
simple android trial checking!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void trial() { | |
Calendar expirationDate = Calendar.getInstance(); | |
expirationDate.set(2015, 3, 15); // hardcoded expiration date | |
Calendar t = Calendar.getInstance(); // Calendar with current time/date | |
if (t.compareTo(expirationDate) == 1) { | |
finish(); | |
Toast.makeText(getApplicationContext(),"Your Trial have been EXPIRED!", Toast.LENGTH_SHORT).show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment