HTML5/DukeScript and access local files/filenames?

54 views
Skip to first unread message

Baltic DukeS

unread,
Jul 28, 2016, 7:07:41 PM7/28/16
to DukeScript
Hi,

I'm new to DukeScript and wrote my first project after some sample projects from website and leanpub.

Is there an way to get an file / filename under Android via DukeScript?
I try 
[...]
<form>
 
<input  type="file"  />
 
<input  type="file" accept="image/*;capture=camera" />
</form>

but "for Android" nothing happens. Under "on Web" no problems the file chooser dialog opens.
I test the same in the Browser under Android and it works but from DukeScript.

There are any (other) hints to get a filename from local storage?

Thanks in advanced.
Andreas.

Jaroslav Tulach

unread,
Jul 29, 2016, 6:00:29 AM7/29/16
to Baltic DukeS, DukeScript
Hello Andreas,
thanks for giving DukeScript a try.

I don't think DukeScript does anything special to handle/disable file selection. I did a quick search and found http://stackoverflow.com/questions/23568792/android-4-4-webview-file-chooser-not-opening - looks like there is a problem with file upload in a WebView on some Android versions.

Hard to say what is the best way to workaround it. One option is to write native Android code to open [real file chooser intent](http://stackoverflow.com/questions/7856959/android-file-chooser) and put it into client-android and use it conditionally.
-jt


--
You received this message because you are subscribed to the Google Groups "DukeScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dukescript+...@googlegroups.com.
Visit this group at https://groups.google.com/group/dukescript.
To view this discussion on the web visit https://groups.google.com/d/msgid/dukescript/e33e345a-f65b-469a-85db-bcd1b4fd91c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baltic DukeS

unread,
Jul 30, 2016, 2:33:49 AM7/30/16
to DukeScript, ap...@czerniak.eu, jarosla...@gmail.com
Hi Jaroslav,

Thanks for your quick reply and links to Android file-chooser. Sorry I forgot, I use/test DukeScript on a (hardware) Android version 5.1.1.
Is there a blog entry, information text, or source code that describe: How can I use methods target-depends e.g., on android? I haven't seen an example yet.

I would like to develop a sample application (under NetBeans 8.1) for a browser&android client to choose a document and send this to the jersey server and return an id.

btw. the dependency for com.dukescript.libraries is v0.2 , can I switch/upgrade it to v0.3 (I found it under 'dependency search')?

Thx in advanced.
Andreas.

Andreas Czerniak

unread,
Aug 2, 2016, 9:26:27 AM8/2/16
to Jaroslav Tulach, DukeScript
Hi Jaroslav,

Thanks for your quick reply and links to Android file-chooser. Sorry I forgo, I use/test DukeScript on a (hardware) Android version 5.1.1.
Is there a blog entry, information text, or source code that describe: How can I use methods target-depends e.g., on android? I haven't seen an example yet.

I would like to develope a sample application (under NetBeans 8.1) for a browser&android client to choose a document and send this to the jersey server and return an id.

Thx in advanced.
Andreas.


Von: "Jaroslav Tulach" <jarosla...@gmail.com>
An: "ap...@czerniak.eu" <ap...@czerniak.eu>
CC: "DukeScript" <dukes...@googlegroups.com>
Gesendet: Freitag, 29. Juli 2016 12:00:27
Betreff: Re: HTML5/DukeScript and access local files/filenames?
Reply all
Reply to author
Forward
0 new messages