I have a project that is MyProject.Cient.Android because it is a client for android devices. I would to use this name beacause I have another project that is MyProject.Client.Wpf, so in this way I can know the kinf of project.
The problem is that when I create my blank android project, I get this method:
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
Then problem is that I can use Android.Content.PM.Permission[] because it is searching in Myproject.Client.Android instead of the real Android.Contect namespace.
So I would like to know how is the way to force this method to search in Android.Content instead of MyProject.Client.Android.
Thanks.
You'll save yourself a lot of headache if your rename your Android project to "MyProject.Client.Droid".
But in the interim, you can use global::Android
to get to the default Android namespace.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.