Ionic Email Composer在Android 11上崩溃 [英] Ionic email composer crash on android 11

查看:53
本文介绍了Ionic Email Composer在Android 11上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的项目中实现了cordova-plugin-email-composer,在此之前它工作得很好,但是在升级到cordova-android@10.0.0之后,应用在触发this.emailcomposer.open(email)时崩溃。

只有Android 11崩溃,而Android 8工作正常。当我改回cordova-android@9.0.0时,Android 8和11都工作正常。

https://github.com/katzer/cordova-plugin-email-composer/issues/350

我发现有人有同样的问题。所以我想知道是错误还是我们需要在config.xml

上写点什么

推荐答案

我找到了Ionic Email Composer崩溃问题的解决方案。 在下面的URL链接中是Android 11中更改的文档。

https://developer.android.com/about/versions/11/behavior-changes-all#share-content-uris

需要在Android下的config.xml中添加以下代码

<config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
                    <uses-permission android:name="android.permission.FLAG_GRANT_READ_URI_PERMISSION" />
                </config-file>
    <config-file parent="/manifest/queries" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
                <package android:name="com.google.android.gm" />
                <package android:name="com.microsoft.office.outlook" />
                <package android:name="com.yahoo.mobile.client.android.mail" />
                <intent>
                    <action android:name="android.support.customtabs.action.CustomTabsService" />
                </intent>
            </config-file>

这篇关于Ionic Email Composer在Android 11上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆