Xamarin Getting Started翻译系列八--许可

许可(permissions)

可以使用XamarinVisual Studio内置的工具在Android清单文件中添加许可。应该只给应用程序设置必须的访问许可,因为用户从Google Play下载应用程序时会提示所需许可。

本文讲解如何在Visual StudioXamarin中设置许可,应该同Adding Permissions to Android Manifest一起阅读。

You can use the tooling supportbuilt into Xamarin Studio or Visual Studio to create and add permissions to the Android Manifest. You should only request permissions that your application requires to run, as users will be prompted to allow these permissions when they downloadyour application from Google Play.

 

This document describes how to add permissions in Visual Studio and Xamarin Studio and should be read in conjunction with the  Adding Permissions to Android Manifestrecipe.

 

使用Visual Studio

l  在解决方案管理器中双击Properties,在Properties窗口选择Android Manifest标签。

l  如果应用程序还没有创建AndroidManifest.xml,点击No AndroidManifest.xml found.Click to add one

Double-click on Properties in the Solution Explorer and select the Android Manifest tab in the

 

Properties window.

 

If the application does not already have an AndroidManifest.xml, click No AndroidManifest.xml found. Click to add one as shown below:

 

l  在Required permissions列表给应用程序添加需要的许可:

Select any permissions your application needs from the Required permissions list and save:


使用 Xamarin Studio

l  在解决方案面板双击项目,选择Options > Build > Android Application

l  如果项目还没有创建AndroidManifest.xml文件,点击Add Android Manifest按钮

Double-click on the project in the Solution Pad and select Options > Build > Android Application. Click the Add Android Manifest button if the project does not already have an AndroidManifest.xml.


l  在列表中选择应用程序所需授权,点击OK按钮:

Select any permissions your application needs from the Required permissions list and click OK:


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值