Using Android permissions in MonoGame - c#

how do you ask for android permission (e.g. file, notification, camera) using monogame or a library that works with net6.0-android?
I've tried finding it online but I can't find anything.

Related

Running an .exe on Android using Xamarin.Forms

I'm trying to build an Android app using Xamarin.Forms based on a Windows Desktop Application that I programmed. In that program, I ran an .exe using Process.Start(), but it doesn't seem to work for Android. Google wasn't a great help, so now I'm wondering:
Is it even possible to run an .exe on Android? If so, whats the best way to do it?

Getting app to install emulator in a xamarin project without having the source code

I have looked through the Microsoft documentation but everything seems to want you to run everything with the development code. I used a bitbar tutorial to help start my C# xamarinui test framework. I have the emulators working I just want the apk and ios apps to install as the first test. I know how to drag and drop and put the app on the phone manually. I am looking for a way to get the app to install and launch through test code or by some operation. I do not have access to the source.
Only for the Android case, google for the apk, usually they are available on sites like apk pure etc. If the apk has executables for x86 inside you could install in on android simulator using just drag and drop.
For iOS this seems not possible as the installer has to be signed with appropriate profiles that only app developer has in his possession.

xamarin android apk installs on emulator but not on device

I have an existing android application which is written in Xamarin Android. when I Adhoc distribute the APK I am able to install the APK on an emulator. However when I try to install the apk on a device I get the following error
Starts installing and then Application cannot be installed. USB debugging enabled and allow application from unknown sources is enabled.
My project properties look like this
Package signing is blank i.e, default
When I do build acrhive and save the apk. I can take the apk and run on an emulator on a different machine however when i try to install the apk on a device it fails with error 'Application not installed'
I am really new to this guys, any help is greatly appreciated. I bet i am missing something simple.
You should sign your APK. Unsigned APK cannot be installed on the real device. Check here how to sign Xamarin Android app.
I figured it out guys. You have to go into play store settings and click play protect and settings. Disable the slider and the app installs.

BackgroundImage() in Xamarin for cross platform mobile design not working

Systems: Windows 10, Visual Studios, Xamarin, Cross platform Mobile Design, Xamarin Live app on iPhone X.
Inside of my MainPage.xaml file, I added the following code:
BackgroundImage="Users\Zakariah Siyaji\Desktop\3840X2160-HDR-Wallpaper-1.jpg"
Without this line, my code compiles and runs correctly. With this line of code, I do not receive errors; in fact, the output window displays: "Deploy to iPhone Player succeeded." But, the Xamarin Live App crashes on the iPhone X. I am having trouble displaying a background image to my carousel page. Is there a fix that I am missing? Do I need additional code?
you cannot access your local pc files from mobile phone,
if you need a background image, then Add it to drawable for android and for ios add it to assets folder under Resources folder.
later you can access it by using
BackgroundImage="image.png";
Your phone cannot access your computer file system.

Unity WebGL Augmented Reality application not working on iOS, but works in Android

As the title suggests, I have made an application using Unity and WebGL platform. The application runs on:
Windows (Firefox, Microsoft edge)
Android (Chrome, Firefox)
MacOS (Safari, Chrome)
Unity (Edditor)
The app does NOT run on:
iOS (Chrome, Safari, Firefox)
The application is using WebCamTexture to get the camera of the device. Wen running on all platforms except iOS the application asks for permition to share the device's camera. However on the iOS it just gives a blue screen and no other info.
The application does not crash, nor give any errors during launch on all platforms. Please tell me if I should share any relative code that might help. How could I successfully run it on iOS using any browser? Please share your experience and knowledge, any help is appreciated.
PS: The plugin used for WebGL Augmented Reality is called NyARToolkitUnity-5.0.8. The git can be found here.
Another detail to mention: The application has been built and tested with both Windows (Unity) and MacOS (Unity). It's currently running on an Asure server.The build can be found here.Thanks!

Categories

Resources