Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gist for checking device android version
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
AlertDialog.Builder dialog = new AlertDialog.Builder(BlueBand.this);
dialog.setTitle("Error");
dialog.setMessage("Support Android 4.3 or above only.");
dialog.setNegativeButton("OK",
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
System.exit(0);
}
});
dialog.show();
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment