我制作了一个 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/