Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova Crosswalk file selection no app can perform this action error

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.

like image 618
ee0jmt Avatar asked Dec 18 '16 21:12

ee0jmt


1 Answers

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

like image 129
eagle Avatar answered Nov 07 '22 07:11

eagle