Subversion Repositories SmartDukaan

Rev

Rev 19653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19653 Rev 19946
Line 226... Line 226...
226
    }
226
    }
227
 
227
 
228
    public static String androidId(Context c) {
228
    public static String androidId(Context c) {
229
        return "" + android.provider.Settings.Secure.getString(c.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
229
        return "" + android.provider.Settings.Secure.getString(c.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
230
    }
230
    }
-
 
231
 
-
 
232
    public static int getVersionCode(){
-
 
233
        try {
-
 
234
            Context c = GoogleAnalyticsTracker.getAppContext();
-
 
235
            PackageManager manager = c.getPackageManager();
-
 
236
            PackageInfo info = manager.getPackageInfo(c.getPackageName(), 0);
-
 
237
            return info.versionCode;
-
 
238
        }catch (Exception e){
-
 
239
            return 31;
-
 
240
        }
-
 
241
    }
231
}
242
}