I am writing some code for file upload for my mobile app using codename one by passing the URL by set URL("jar:///UploadFile.html") in start() method of codename one. In my Upload File.html while I am trying to upload an image its opening a Dialog Box outside the mobile app,how can I able to open the Dialog Box for suppose gallery and documents inside the codename one app.
Below is my code in codenameone from where I am navigating to the html file
public void start() {
if(current != null){
current.show();
return;
}
Form hi = new Form("");
final WebBrowser b = new WebBrowser()
b.setURL("jar:///UploadFile.html");
b.getUnselectedStyle().setPadding(0, 0, 0, 0);
b.getUnselectedStyle().setMargin(0, 0, 0, 0);
BorderLayout blayout = new BorderLayout();
blayout.setScaleEdges(false);
hi.setLayout(new BorderLayout());
hi.addComponent(BorderLayout.CENTER, b);
hi.show();
}
Please find Below html code
<pre>
input type="file" multiple accept="image/*"
</pre>
Please find the below screen shot for file upload
[1]: https://i.stack.imgur.com/FMzcr.png
What am I missing?
Thank you.