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.

4

2 回答 2

3

嘿,我发现将accept="" 属性编辑为accept="image/ " 或accept="video/ " 可以解决问题。此外,诸如 .ext 之类的属性或多个属性,即 accept="image/ , video/ " 虽然语法正确,但也会引发相同的错误。希望这可以帮助

于 2017-02-11T21:37:24.417 回答
0

我遇到了同样的问题,这是因为我没有在文件中包含cordova.js脚本。index.html

所以我简单地添加了以下行index.html,它工作正常。

<script type="text/javascript" src="cordova.js"></script>
于 2017-02-27T15:47:55.303 回答