I'm using API 23 Android 6.0 AVD,and I can import files using Via Browser on my phone, which uses WebView version 48. BTW I'm using file:// scheme. Is it possible that only content:// can be accepted by TiddlyWiki? But I imported a file successfully, which only provides file:// scheme. and I was not using onActivityResult. Is it possible that the problem is caused by this?
在 2019年4月16日星期二 UTC+8上午1:32:34,Jeremy Ruston写道: > > Hi donmor3000 > > It sounds like the webview that you’re using to display TW5 doesn’t > support the latest JavaScript features such as Object.assign(). However, > the strange thing is that the error message references > $:/core/modules/wiki.js, which does not currently use Object.assign(). Are > you using the latest version of TW5? > > Best wishes > > Jeremy. > > On 15 Apr 2019, at 15:49, donmor3000 <[email protected] <javascript:>> > wrote: > > I'm making an Android app implementing basic functions of TiddlyDesktop on > my phone, where the app malfunctioning importing photos, but I can upload > the same photo to Sogou.com. > > <Screenshot_1555338534.png><Screenshot_1555338580.png> > <Screenshot_1555338551.png> > > Part of logcat generated on error occored: > > 04-15 22:29:40.122 15224-15224/indi.donmor.tiddloid I/chromium: > [INFO:CONSOLE(8830)] "Uncaught TypeError: Object.assign is not a function", > source: file:///storage/emulated/0/123/121121.html (8830) > > 04-15 22:29:40.129 15224-15224/indi.donmor.tiddloid I/chromium: > [INFO:CONSOLE(1146)] "Uncaught TypeError: Object.assign is not a function", > source: $:/core/modules/wiki.js (1146) > > The onShowFileChooser part(my minSdk is 21, targetSdk is 27, fileOpen is a > static method opening the file dialog) > > @Override > public boolean onShowFileChooser(WebView webView, > ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) { > uploadMessage = filePathCallback; > MainActivity.fileOpen(TWEditorWV.this, > fileChooserParams.getAcceptTypes(), new MainActivity.OnFileTouchedListener() { > @Override > public void onFileTouched(DialogInterface dialog, File file) { > if (uploadMessage == null) return; > Uri[] results = null; > if (file != null && file.exists()) { > System.out.println(file.getAbsolutePath()); > System.out.println(file.toURI()); > try { > results = new Uri[]{Uri.parse(file.toURI().toString())}; > } catch (Exception e) { > e.printStackTrace(); > } > > System.out.println(Uri.parse("file://"+file.getAbsolutePath())); > System.out.println(results); > } > uploadMessage.onReceiveValue(results); > uploadMessage = null; > } > > @Override > public void onCanceled() { > if (uploadMessage == null) return; > uploadMessage.onReceiveValue(null); > uploadMessage = null; > } > }); > return true; > } > }); > > > Does anybody have idea about this error? I'd appreciate it:-) > > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWikiDev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > Visit this group at https://groups.google.com/group/tiddlywikidev. > To view this discussion on the web visit > https://groups.google.com/d/msgid/tiddlywikidev/6e80755f-6a5f-47ef-aa45-c6302f90f9ea%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywikidev/6e80755f-6a5f-47ef-aa45-c6302f90f9ea%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > <Screenshot_1555338534.png><Screenshot_1555338580.png> > <Screenshot_1555338551.png> > > > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/4206aa88-7b2f-48ac-9b7a-83cbf1cb7813%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
