Closed
Description
It turns out, that Display.getInstance().execute(url) is not working correctly for url open Android 6.0+.
When the following code is run:
button.addActionListener(new ActionListener<ActionEvent>() {
@Override
public void actionPerformed(ActionEvent evt) {
Display.getInstance().execute("https://www.codenameone.com");
}
});
Then app asks for media permission (which is not needed for simple urls):
The problem reason seems to be, that in https://github.com/codenameone/CodenameOne/blob/master/Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java createIntentForURL method has this code:
if (url.startsWith("intent")) {
intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
} else {
if(!checkForPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, "This is required to open the file")){
return null;
}
Metadata
Metadata
Assignees
Labels
No labels