Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AppConstants {
- public static final boolean DEBUG = false;
- public static final String MY_AD_UNIT_ID = "01234b67890123c4"; //com.aydabtudev.broadcastsms
- private static String APPLICATION_VERSION_NAME = "unknown";
- private static int DAY_OF_YEAR = -1;
- private AppConstants() {
- // This should not be instantiated.
- }
- public static String getAppVerName(Context context) {
- try {
- APPLICATION_VERSION_NAME = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
- } catch (NameNotFoundException e) {
- e.printStackTrace();
- }
- return APPLICATION_VERSION_NAME;
- }
- public static int getToday() {
- // Return the Julian date as an integer
- Calendar c = Calendar.getInstance();
- DAY_OF_YEAR = (int) c.get(Calendar.DAY_OF_YEAR);
- return DAY_OF_YEAR;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement