Geo fence in Visual Studio Android Emulator - android-emulator

I am trying to see, if anyone was able to run Geo fence on visual studio android emulator. When I try to add a geo fence, it gives me a 1000 status code. I have played around with all the location settings option in the emulator with not much luck. However, maps and other location tracking is working fine.
I have tried this code on android sdk emulator and device and it works fine there.
Looking for some inputs. Thanks in advance!

If you are relying on the geofencing API from Google Play Services, then this doesn't work because the VS Emulator for Android doesn't include the Google Play libraries out of box. The same workarounds for installing Google Play Services on other emulators (eg. Xamarin Player) may work on the VS Emulator for Android too.

I had a similar problem, but on Android Studio Emulator. Not sure if this will work for you, but just in case:
I solved it going to "Google Settings" > Location > Mode
And changing it from "Device only" to "High Accuracy".
This way my app finally worked.
Hope it helps.

Related

Emulator works in Android Studio but not VS Code

I'm running emulated devices in android studio just fine, but when i try running it in VS Code, I'm get this error: "Failed to launch Pixel 2 API 27: Error: Emulator didn't connect within 60 seconds"
saw some videos and guides, but they all say to reinstall the emulator or wipe the emulated device, which doesn't help.
what could be the problem?
trying to use this for a flutter project that i'm trying to create, and it kind hurts testing.
I found your problem is the same as this
Steps:
Open Android Studio Tools -> AVD Manager Virtual Device -> Actions (Refer Image) Click On Stop Now Start Emulator Now it's working fine :)
or please visit that link Failed to launch`
Apparently, the only way to run the emulator, is to run the device in Android studio, and then run the app in visual code.

Android Emulator Screen(API 28) is distorted and scratched

This question has already been asked here Android Studio Emulator Screen is "Scratched" and distored but there is no fix suggested there. I do not have enough reputation to add comment or reply to that question, hence asking it here again in the hope of finding solution to my problem. My issue is exactly similar:
Scratched and Distorted Android Emulator Screen
I have tried all the emulators(all come distorted and scratched), tried wiping data on them but nothing helps. My emulator's info is :
Android Emulator Info:
I am using Android Studio 3.2.1 and OS is OS X El Capitan (Version 10.11.6)
.
Please help me in fixing this.
Apologies that this is a suggestion instead of an answer...
Anyway, I noticed in the question you linked there was a device in use. That is, a setting in the avd's config.ini (located for me at ~/.android/avd/{{emulator name}}.avd/config.ini) for hw.device.hash2, hw.device.name, and hw.device.manufacturer.
Have you tried creating the emulator using avdmanager? For example:
avdmanager create avd --name myNewEmulator -k "system-images;android-28;google_apis_playstore;x86"
This will create the emulator without these device settings as long as you don't specify them in the custom hardware profile.
Lastly, you won't be able to start the emulator from Android Studio. Instead use the emulator tool located in your Android sdk folder and run:
emulator #myNewEmulator

Trouble running emulator in android studio

I am unable to run the emulator in android studio. I received a "Your cpu does not support required features (VT-x or SVM)" message. Someone told me to try and do what this link states "http://www.howtogeek.com/213795/how-to-enable-intel-vt-x-in-your-computers-bios-or-uefi-firmware/" which led me to a video and I tried following those directions but was unable to because first, there was no HyperV feature in the Windows features section. Second, there was no UEFI Firmware settings icon when I went to advanced settings in set up. How can I proceed from here to enable the VT-x in order for me to be able to use the emulator in Android studios? Thank you so much!!
Okay your cpu does not support is not the same as cannot use emulator you just have to use one that runs x86 images which is in fact GenyMotion...
https://www.genymotion.com/
sign up for free account and when you download you want the full install package with virtualbox included.
and it does support instantrun just like the google android emulators do
You will also find the android studio genymotion plugin at the same site to download and use with android studiio

Visual Studio Emulator for Android working but not listed in VS ('No devices available')

I wanted to test out the Visual Studio Emulator for Android, so I grabbed an example project (https://code.msdn.microsoft.com/hello-jni-Android-790ab73d#content). Unfortunately, I can only select 'No devices available' respectively 'Android Virtual Device Manager" under Target Device.
When I start the emulator from the menu (Extras - Visual Studio Emulator for Android), it works fine - Visual Studio just somehow can't see it.
I tried to restart VS while the Emulator was running, but that also didn't help.
adb devices -l correctly lists the running emulator, btw.
Does somebody have any idea what could be wrong?
I had the same type of issue on my environment. I checked registry key "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Android SDK Tools" location and "Android SDK Tools" Key didn't exist. I created the Key and add String Value called Path and I provided Android SDK Tools path. It solved my issue. It is worth to shot.
Turns out I didn't get the message that the emulator only supports the debugging of x86 images - I changed the target platform to x86 and now it is working.
(Btw, I very quickly got the answer from a friendly Microsoft Employee after I sent them an email - Worth mentioning, I'd reckon)

Testing GWT application on Mobile Emulator

I want an android and iphone emulator to run on windows to test my gwt application on windows. can someone point me to a proper emulator because i've been trying some with no success
The official iPhone simulator does not run on Windows. Seems you have to get a Mac ;-)
However the Android emulator can be installed pretty much anywhere:
http://developer.android.com/guide/developing/tools/emulator.html
If you point the Andorid browser in the emulator to your GWT application you should be able to test it. You can find messages from the browser in LogCat, watch out for the logging tag WebCore. You can even log from within your code and get the output in LogCat, see:
http://developer.android.com/guide/webapps/debugging.html