Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In Xamarin Android how is AssemblyInfo.cs related to AndroidManifest.xml?

I find it confusing that Xamarin docs examples suggest adding permissions to AssemblyInfo.cs like that:

// Need to access the internet for GCM
[assembly: UsesPermission(Name = "android.permission.INTERNET")]

Why? Permissions are usually defined in AndroidManifest.xml and there's even GUI for that in Xamarin Studio.

Also seems like AssemblyInfo.cs contains information about title and version:

[assembly: AssemblyTitle("MyApp")]
[assembly: AssemblyVersion("1.0.0")]

What does that mean? AndroidManifest.xml also contains title and version info.

How are they related? Seems to be basic knowledge, but didn't found clear explanation about that.

like image 774
rudyryk Avatar asked Aug 22 '15 13:08

rudyryk


People also ask

Where is AndroidManifest XML in Xamarin?

The resulting merged AndroidManifest. xml resides in the obj subdirectory; for example, it resides at obj/Debug/android/AndroidManifest.

Where is AndroidManifest XML Visual Studio?

xml file. Double click Properties to open the Project Options. Click the “Android Manifest” tab.

How does xamarin help mobile development?

Xamarin allows developers to develop native applications for Android, iOS and Windows Phone platforms, with a single codebase, i.e. C# and a single IDE, i.e. Visual Studio . Thus, a developer can be able to develop native mobile applications without knowing Java, Kotlin, Objective-C or Swift.


1 Answers

Xamarin just added this way as another way to add permissions but at assembly level, if you do not use it no problem!, you can continue setting the permissions as usual in the AndroidManifest.xml. Reference in this link

like image 117
Anon Dev Avatar answered Sep 20 '22 03:09

Anon Dev