Bug 5396 - Special uses-permission lost when updating the app's project properties
Summary: Special uses-permission lost when updating the app's project properties
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Android ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-05-29 12:27 UTC by Mark Bowman
Modified: 2016-08-03 15:25 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Mark Bowman 2012-05-29 12:27:02 UTC
I created a Mono for Android project and implemented the Android licensing service.  The service requires the CHECK_LICENSE permission which is not listed in the Android Manifest permissions within the project properties window.  Therefore, I manually typed the following permission in the AndroidManifest.xml file: <uses-permission android:name="com.android.vending.CHECK_LICENSE" />.  If I open the app's project properties and change any of the Android Manifest settings, I lose my CHECK_LICENSE permission.  Please add this permission to the list or don't remove manually inputted permissions whenever updating the manifest options in the project properties.  I ended up getting an error after deploying the app to the Google Play store because this permission got removed and I didn't know it.
Comment 1 Jonathan Pobst 2012-05-29 12:43:44 UTC
Fixed for 4.4.  Thanks for the report!



If you need a workaround for now, you can add the permission in code and it will get added when the package is built:

[assembly: UsesPermission ("com.android.vending.CHECK_LICENSE")]

Usually these are placed in your AssemblyInfo.cs.