I have a pretty simple android application written on Xamarin and running on two different virtual devices: on Genymotion Google Nexus 5 - Android 5.1.0 and Genymotion Google Nexus 6P - Android 6.0.0. After some debugging I've discovered that Mkdirs does not create the directory on my virtual device. How can I get the reason why? My guess is that my app does not have permissions to save the files or create directories on device's external storage even though WRITE_EXTERNAL_STORAGE permission is set to true. Are there some changes in Android 6 permissions?
Android 6.0 introduced Runtime permissions. In addition to declaring the permission on your manifest, you need to request the permission from the user at runtime.
More info and tutorials here: http://developer.android.com/training/permissions/requesting.html
For Xamarin specific information: https://blog.xamarin.com/requesting-runtime-permissions-in-android-marshmallow/
Related
As I am upgrading my uwp app to WindowsAppSDK and WinUI3 desktop app, I got this exception of Permission denied on PublisherCacheFolder. And it was working fine in uwp. I intend to package the app with msix so I will still technically upload it to store.
Just to clarify I do have folder names in package file in Extensions thats how it was working fine in uwp
Fixed it by reinstalling the app, dont know why but it had to do something with existing uwp version of the app being overriden with this windowsAppSDK version of the app under same publisher
I followed these two docs (Doc1, Doc2) to integrate Feedback hub in my app. I used NuGet to install the Microsoft Store Services SDK.
As recommended I am using StoreServicesFeedbackLauncher.IsSupported() to check if the Feedback hub is available or not. This works locally on my machine, but in production all customers hit System.Exception with message "Method 'StoreServicesFeedbackLauncher.IsSupported()' was not included in compilation, but was referenced in HomePage.<feedback_tapped>d__23.MoveNext(). There may have been a missing assembly."
I have read the docs again and don't seem to have missed any of mentioned the steps.
Edit
This app is a Desktop Bridge app. The solution has a UWP app which communicates with a win32 exe. I am trying to launch the app from UWP app. The solution has a Windows Application Packaging project to package the app.
I get this error
Unexpected error - Please file a bug report at http://bugzilla.xamarin.com. Reason: System.IO.FileNotFoundException: Could not load assembly 'FormsViewGroup, Version=, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
help me...
I am assuming you do not have Google Play Services installed on your Android emulator which is required for Google Maps to be used/displayed. (more details in your question would help, code/stacktrace/...)
Test your app on a physical device
Or
(Assuming you are using the Xamarin Android Player, but this also works on Genymotion and VisualStudio Android emulator)
Install Google Play Services on your emulator:
Start the Xamarin Android Player
Download the proper Google Play Services .zip file from www.teamandroid.com/gapps/ .
Note: Make sure to download the image appropriate for your version of Android.
Drag the .zip file onto the running emulator and drop it to install the component
You will get a prompt to install the package onto the emulator which indicates the image will be restarted
Once it restarts, you will get a notification that installation is completed, and the image will now have Google Maps, Google+ and support for the Google Play store.
Note that some things do not work correctly and you may get a few errors from some of the services, but you can safely dismiss these and continue the instructions.
Next, you will need to associate a Google account so that you can update the services using the Google Play store. It should prompt you for this, but if it does not, you can go into the Google Settings and add a new account.
Once you've added the account, you can then update the Google apps by opening the Google Play store application
https://university.xamarin.com/resources/how-to-install-google-play-on-android-emulator
Hi guys I have some questions regarding deploying apps from Xamarin for Android. I have a samsung s3 with jellybean 4.1 in it and I want to deploy my app that I developed from Xamarin to my phone. But my problem is I do not know how to deploy it on a jellybean 4.1 OS. We have tried ice cream sandwhich before but jellybean is something I'm not even sure about whether it is supported by Xamarin for android or not? Is it possible to deploy my app in my phone? And anyone of you guys who knows how to do it??? I'd appreciate the help thank you!
Yes, you can deploy to the S3 running JellyBean 4.1 (we are using one for testing).
Install the Samsung Kies manager on your dev machine so that you can get the latest device drivers. If your phone still doesn't come up as an option when debugging your code then make sure that USB Debugging is enabled on the device.
Also, make sure that your application is targeting the Android version you want at a minimum (right click the project -> Properties... -> Application -> Minimum Android to target).
There is no difference in procedure for deploying an app to Ice Cream Sandwich vs Jelly Bean.
Make sure your app's target SDK version is API 16 (API 17 if you want JellyBean 4.2). Follow the instructions I posted here to get the correct ADB drivers installed. Samsung ADB driver installation via Samsung Kies
Also make sure you have the Jelly Bean SDKs installed by opening Android SDK Manager. If the SDKs for APIs 16 & 17 are not installed you will need to install them.
It should be the same procedure to deploy to a Jellybean phone.
You just have to make sure your phone has USB debugging activated, it's usually found in the "Developer Options" part of the settings, which must be enabled before you can activate USB debugging mode.
If you're not debugging on the device, make sure you set Build Configuration to Release so you get the Xamarin runtimes.
I have Mono for Android trial version and am having some trouble with the MapsAndLocation demo.
I start up the emulator, yet when I select 'Run->Start Without Debuggin', I get the following error:
C:\Users\Simon\Documents\Xamarin\MapsAndLocationDemo\xamarin-monodroid-samples-d76baf3\MapsAndLocationDemo\obj\Debug\android\src\mapsandlocationdemo\MapWithOverlayActivity.java(33,33): Error: package com.google.android.maps does not exist
extends com.google.android.maps.MapActivity
As well as another 20 errors.
What do I need to fix this situation. Do I need to install an additional package? If so, what is it, and where can I find it?
thanks
Please ensure you are deploying to an emulator that targets Google APIs.
To do this create a new emulator in the Android Virtual Device Manager and change the target from "Android 2.2 - API Level 8" to Google API eg. "Google APIs (Google Inc.) - API Level 16".
If you cannot see any Google API targets you will need to install one by using the Android SDK manager.