Skip to content

Commit

Permalink
Do not use a file:// scheme in intents
Browse files Browse the repository at this point in the history
That is not allowed as of Android 7.
  • Loading branch information
fornwall committed Oct 26, 2016
1 parent f79d940 commit c11da94
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void onItemClick(AdapterView<?> parent, View view,

Intent.ShortcutIconResource icon = Intent.ShortcutIconResource.fromContext(context, R.drawable.ic_launcher);

Uri scriptUri = new Uri.Builder().scheme("file").path(clickedFile.getAbsolutePath()).build();
Uri scriptUri = new Uri.Builder().scheme("com.termux.file").path(clickedFile.getAbsolutePath()).build();
Intent executeIntent = new Intent(context, TermuxLaunchShortcutActivity.class);
executeIntent.setData(scriptUri);
executeIntent.putExtra(TermuxLaunchShortcutActivity.TOKEN_NAME, TermuxLaunchShortcutActivity.getGeneratedToken(context));
Expand Down

0 comments on commit c11da94

Please sign in to comment.