Cordova Crosswalk file selection no app can perform this action error
Asked Answered
G

2

9

I am creating an android app using Cordova with the Crosswalk webview and the dtworkshop-inappcrossbrowser plugin. The app is effectively wrapping a website.

On the website there is a form that allows you to upload a photo. The problem is that when I select the browse button I get the message "Choose an action" followed by "No apps can perform this action".

I am not totally sure how the upload button functions, but I know that it is not an input element because I experimented with an input and I know it works.

I read that it could be a permissions so I have added the following, but still no luck:

READ_EXTERNAL_STORAGE, INTERNET, WRITE_EXTERNAL_STORAGE, ACCESS_NETWORK_STATE, ACCESS_WIFI_STATE, CAMERA, MANAGE_DOCUMENTS.

I have tested in the android chrome browser and everything works, so I know its related to the app.

I have created the same app for iOS and everything works. I know there are issues with the android webview hence the reason I am using the crosswalk plugin, thought these issues were going to be solved.

Any help advice about how I can get this working is much appreciated.

Gossipmonger answered 18/12, 2016 at 21:17 Comment(2)
Ever reach a conclusion @GossipmongerPralltriller
No sorry @Pralltriller I ended up not using the crosswalk plugin and instead using the chrome tabs plugin to view that page.Gossipmonger
A
3

Hey I have found that editing the accept="" attribute to accept="image/" or accept="video/" fixed the problem. Also attribute such as .ext or more than one attribute i.e accept="image/, video/" though syntax wise are correct will throw the same error. Hope this helps

Allerus answered 11/2, 2017 at 21:37 Comment(1)
In my case accept="image/png" worked. But thanks for right direction anyway.Arkwright
P
0

I had the same problem and it was due to the fact I was not including cordova.js as script in my index.html file.

So I simply added the following line to index.html and it was working fine.

<script type="text/javascript" src="cordova.js"></script>
Piazza answered 27/2, 2017 at 15:47 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.