Xamarin.android app only opens directly from play store - xamarin

In my xamarin.forms android app I am facing a strange issue. I published my app on playstore and in certain devices , when we download the app and open directly from playstore, it will navigate to Mainpage and work as intented. But when we open the app from phones launcher a white screen will show after splashpage and will stuck at there.If we get back to playstore and open the installed app from there , it works. I noticed this issue in all VIVO phones and some samsung devices(these are the only ones I have currently access). But in my huawei honor 8X no issue .
What will be the cause of this problem?
My release configuration.
Enable Multi-Dex -- True
Android Package format -- apk
Dex compiler -- dx
Code shrinker -- None
Linking -- Sdk Assemblies Only
Supported architecture -- armeabi-v7 , arm64-v8a
Minimum android version -- Android 7.0
Target android Version -- Android 9.0

Related

Xamarin.Forms Android app crashing on splash screen of Android 12

I am currently testing my app with VS 2019. Works fine with android devices lower than android 12 but crashes on devices => android 12.I updated android target framework to Android 12. Application that is being deployed on Android 12 crashes on the splash screen without throwing any errors, exception or activating any debugger in App.xaml.cs, SplashActivity.cs or any other file that supposed to be called. I tried all the possible changes in android manifest, mainActivity and splashActivity but it didn't work. Versions 6.4.0 of MVVMCross.Forms and 4.8.0.1821 of Xamarin.forms are both used in my application. I uploaded the app to the Play Store for internal testing, and while it functions on all devices, Android 12 devices experience splashing crashes.
I'm using VS 2019, Android SDK 31 and Android JDK 11.
I am getting a similar crash in of one my other app as well. Can you please guide me ? I checked but I did not find anything on this.

Android app not compatible for Android SDK built for x86

I've successfully upload android app based on xamarin forms in google play store, it shows the list of my real devices that are compatible but it also shows that all my emulators are not compatible with it. When I debug it from visual studio it runs on my emulator. Now that it's in google play I want to try it in my emulator since I don't currently have my physical device I can't install it due to compatibility. It says not compatible to Android SDK built for x86.

Cannot test Xamarin ios App on device

I have just created an xamarin ios app 'TestApp' for testing on iphone device. The same app created on xcode and deployed succuessfully on both iphone and simulator.
I have created an Apple Id using this .Below image shows the the provisioning profile and signing identity i have created.
Bundle identifier of both mac and windows project are same also. i have followed this link for free provisioning. Appie Id is added to the visualstudio project using fastlane. But when i run this app on visualstudio2017, it just builds successfully; neither deploying to the iphone nor simulator; just builds and run button enables again .no more. How can i deploy the app on device?
Now its working...Tools -> Extensions and Updates-> 'Mono Debugging For Visual Studio' was disabled. I Enabled it and program now deploys to the device ..

Why am I having trouble with the Android Emulator in VS Comm 2017?

I was having trouble using the Android emulator in Visual Studio Community 2017 and I decided to create a blank project to see if it will run. I get this error message when attempting to run it in the Live Xamarin Player:
Starting Android Emulator Android_Accelerated_x86_Nougat...
Failed to boot Android device emulator-5554...
Unable to deploy to Android_Accelerated_x86_Nougat, please ensure the Xamarin
Live Player app is open and the device is on the same network as Visual Studio.
Why would I have trouble running the emulator in a fresh blank project when I didn't even write a single line of code? Thanks for your help.
UPDATE: So I installed the latest Android SDK 8.0 along with they system image and tried to create a virtual device that uses it. But the Android Virtual Device Manager shows a, 'No system images installed' message when I selected the 8.0 framework. So I installed an earlier version of the SDK along with a system image (5) and was able to create a virtual device with it. So another question is why wouldn't the system images show up for the 8.0 framework?
The $(TargetFrameworkVersion) for Xamarin.Forms.Platform.Android.dll
(vv8.0) is greater than the $(TargetFrameworkVersion) for your project
(v7.1). You need to increase the $(TargetFrameworkVersion) for your
project
This means the Xamarin.Forms library is targeting Android 8.0 (API level 26) but your project is setup for Android 7.1 (API level 25). You can't change the Xamarin.Forms target version without downgrading, but you can change your project target version easily. You can learn more about these concepts from Xamarin. Be aware some of the details of that Xamarin blog post are already out of date!
There is another nice blog post from Xamarin which can walk you through the process of setting your system up for Android 8.0 API level 26. It's normally not this complicated, but Google changed their SDK tools internally between 25 and 26 in very major ways. They changed from GUI tools to command line tools.
You'll probably also want to get the (in preview) Xamarin Android Device Manager if you don't have a physical device to test with. This Xamarin Android Device Manager tool is the only way to create and configure API 26 and higher emulators without using the Google command line tools.
It seems as though Google has gotten rid of the GUI apps that manage the SDK and Virtual Devices in the latest version, so when you try to create a new virtual device with 8.0 it's not compatible with the GUI tools. Until Xamarin releases a GUI tool to replace them we can use the command-line to manage the SDK and virtual devices.
https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/sdk-cli-tooling-changes
https://developer.android.com/studio/command-line/avdmanager.html

Fail to create Android virtual Device, "No system image installed for this Target"

Unable to create Android Virtual Device
i follwed this link.
I installed all ARM images for each Android more than 4.0.
I installed intel & MIPs as well.
But, still my AVD Manager is saying "NO System images installed for this target".
why, so?
In order to create an Android Wear emulator you need to follow the instructions below:
If your version of Android SDK Tools is lower than 22.6, you must update
Under Android 4.4.2, select Android Wear ARM EABI v7a System Image and install it.
Under Extras, ensure that you have the latest version of the Android Support Library. If an update is available, select Android Support Library. If you're using Android Studio, also select Android Support Repository.
Below is the snapshot of what it should look like:
Then you must check the following in order to create a Wearable AVD:
For the Device, select Android Wear Square or Android Wear Round.
For the Target, select Android 4.4.2 - API Level 19 (or higher, otherwise corresponding system image will not show up.).
For the CPU/ABI, select Android Wear ARM (armeabi-v7a).
For the Skin, select AndroidWearSquare or AndroidWearRound.
Leave all other options set to their defaults and click OK.
Then you are good to go. For more information you can always refer to the developer site.
As a workaround, go to sdk installation directory and perform the following steps:
Navigate to system-images/android-19/default
Move everything in there to system-images/android-19/
The directory structure should look like this:
And it should work!
If you use Android Studio .Open the SDK-Manager, checked "Show Package Details" you will find out "Android Wear ARM EABI v7a System Image" download it , success !
I had android sdk and android studio installed separately in my system. Android studio had installed its own sdk. After I deleted the stand-alone android sdk, the issue of "“No system image installed for this Target” was gone.

Resources