[英]Cordova - Unable to trigger Android to let me choose an image to upload
我正在使用Cordova包装第三方iframe。 在iframe中,有一个上传按钮。 它可以在iOS上运行 ,我可以选择要上传的照片(请参见下面的屏幕截图)。
在Android上,虽然当我单击上传按钮时没有任何反应,该按钮应提示用户打开图库以选择文件。
控制台中没有错误,但我在LogCat中发现此错误 : No activity found to handle file chooser intent: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.GET_CONTENT cat=[android.intent.category.OPENABLE] typ=.jpg,.png,.tiff,.jpeg,.tif,.pdf }
该错误告诉我该设备未安装能够处理该特定隐式意图的应用程序 。 但是为什么它不能使用默认的“照片”或“文件”应用程序? 当我尝试使用移动浏览器上传图像时,Files App会正确显示。
我该如何解决?
<uses-permission android:name="android.permission.MANAGE_DOCUMENTS" />
<allow-intent href="https://*.mydomain.com.*"/>
<allow-intent href="tel:*"/>
<allow-intent href="sms:*"/>
<allow-intent href="mailto:*"/>
<allow-intent href="geo:*"/>
经过进一步调查,我意识到这不是权限问题。
当我手动将第三方上传按钮HTML更改为<input type="file" />
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.