Code example for Random

Methods: nextLong

0
 
		return randomString() + ".jpg"; 
	} 
 
	public static String randomString() {
		return Long.toString(Math.abs(random.nextLong()), 10);
	} 
 
	/** 
	 * Checks that the device supports Camera. 
	 *  
	 * @param Context 
	 *            context - The calling activity's context. 
	 * @return boolean - True if it supports otherwise false. 
	 */ 
	public static boolean deviceHasCamera(Context context) {
 
		PackageManager pm = context.getPackageManager();
 
		if (pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)) {
			return true;