Answers for "get version android"

0

get app version android

String versionName = context.getPackageManager()
    .getPackageInfo(context.getPackageName(), 0).versionName;
Posted by: Guest on April-16-2020
0

get app version android

String versionName = context.getPackageManager()
    .getPackageInfo(context.getPackageName(), 0).versionName;
Posted by: Guest on April-16-2020
0

get app version android

PackageManager manager = this.getPackageManager();
PackageInfo info = manager.getPackageInfo(this.getPackageName(), PackageManager.GET_ACTIVITIES);
Toast.makeText(this,
     "PackageName = " + info.packageName + "\nVersionCode = "
       + info.versionCode + "\nVersionName = "
       + info.versionName + "\nPermissions = " + info.permissions, Toast.LENGTH_SHORT).show();
Posted by: Guest on April-16-2020
0

get app version android

PackageManager manager = this.getPackageManager();
PackageInfo info = manager.getPackageInfo(this.getPackageName(), PackageManager.GET_ACTIVITIES);
Toast.makeText(this,
     "PackageName = " + info.packageName + "\nVersionCode = "
       + info.versionCode + "\nVersionName = "
       + info.versionName + "\nPermissions = " + info.permissions, Toast.LENGTH_SHORT).show();
Posted by: Guest on April-16-2020
1

android get sdk version

if(android.os.Build.VERSION.SDK_INT ==  android.os.Build.VERSION_CODES.LOLLIPOP){
	// Code For Android Version higher equal to LOLLIPOP(21)
} else if(android.os.Build.VERSION.SDK_INT > 21){
	// Code For Android Version higher than LOLLIPOP(21)
} else{
	// Code For Android Version lower than LOLLIPOP(21)
}
Posted by: Guest on May-18-2020
1

android get sdk version

if(android.os.Build.VERSION.SDK_INT ==  android.os.Build.VERSION_CODES.LOLLIPOP){
	// Code For Android Version higher equal to LOLLIPOP(21)
} else if(android.os.Build.VERSION.SDK_INT > 21){
	// Code For Android Version higher than LOLLIPOP(21)
} else{
	// Code For Android Version lower than LOLLIPOP(21)
}
Posted by: Guest on May-18-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language