Skip to content

Commit 5fa6299

Browse files
committed
don't quit the app if permissions were not granted, just show a warning.
1 parent 52dd8a0 commit 5fa6299

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/processing/mode/android/AndroidBuild.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,11 +987,11 @@ private void writeMainActivity(final File srcDirectory, String[] permissions) {
987987
writer.println(" for (int i = 0; i < grantResults.length; i++) {");
988988
writer.println(" if (grantResults[i] != PackageManager.PERMISSION_GRANTED) {");
989989
writer.println(" AlertDialog.Builder builder = new AlertDialog.Builder(this);");
990-
writer.println(" builder.setMessage(\"The app cannot run without these permissions, will quit now.\")");
990+
writer.println(" builder.setMessage(\"Some permissions needed by the app were not granted, so it might not work as intended.\")");
991991
writer.println(" .setCancelable(false)");
992992
writer.println(" .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {");
993993
writer.println(" public void onClick(DialogInterface dialog, int id) {");
994-
writer.println(" finish();");
994+
// writer.println(" finish();");
995995
writer.println(" }");
996996
writer.println(" });");
997997
writer.println(" AlertDialog alert = builder.create();");

0 commit comments

Comments
 (0)