xamarin.forms - 如何在 Xamarin.forms for Android 的权限对话框中自定义文本?

标签 xamarin.forms xamarin.android permissions

我制作了一个 Xamarin.Forms 应用程序并为位置、相机等设置了权限。我在 IOS 中为这样的位置创建了自定义文本权限对话框:

<key>NSLocationWhenInUseUsageDescription</key>
    <string>Test Message.</string>

但我找不到如何在 Android 中制作它。有什么建议吗?

最佳答案

简短的回答是,你不能

根据 Android 的 documentation :

Note: Your app cannot customize the dialog that appears when you call launch(). To provide more information or context to the user, change your app's UI so that it's easier for users to understand why a feature in your app needs a particular permission. For example, you might change the text in the button that enables the feature.

您可以做的是,他们建议开发人员做的是调整您的 UI 或显示一个弹出窗口,说明您需要指定权限的原因。

关于xamarin.forms - 如何在 Xamarin.forms for Android 的权限对话框中自定义文本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62552823/

相关文章:

ios - Xamarin.Forms HttpClient 到 RESTful Web 服务

c# - 相当于 Xamarin Forms 的 Toast

javascript - EvaluateJavascript 或 LoadUrl 根本没有在 Xamarin 中执行

c# - 在文件共享 Xamarin.forms 中获取原始文件名

Safari 本地主机权限被阻止

linux - 无法从 Vagrant VM 更改文件所有权

android - adb remount 权限被拒绝,但能够在 shell 中访问 super 用户 -- android

c# - 由于出现奇怪的错误,Xamarin.Forms Android 项目无法编译

xaml - 如何在Xamarin iOS,Android中以Xamarin形式设计以下 GridView

c# - 初始化中的 Mvvmcross View 模型导航不起作用