Android LicenseChecker from Emulator - android-emulator

I have been trying to run the Emulator (Android 2.2 - Level 8) with Google APIs level 9 to test my License Checker implementation to no avail. This is as recommended at: http://developer.android.com/guide/publishing/licensing.html#test-env
It runs fine on the device, but not on the emulator.
On my AVD emulator, I don't have the Market installed. So I am not sure if the documentation is wrong because the architecture does show the dependency on the Market.
Has anyone had any luck running the LVL code on the emulator?
Thanks.

Sounds like you are trying to run Emulator with a target of "Android 2.2 - API Level 8". In order to get the LicenseChecker to run, the target for your Virtual Device needs to actually be "Google APIs (Google Inc.) - API Level 8". This will still open up the emulator for 2.2, but will have the Google APIs ready to use.
From the Licensing page:
To set up an emulator for adding licensing to an application, follow these steps:
Launch the Android SDK and AVD Manager.
In the Available Packages panel, select and download the SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK repository, as shown in the figure above.
When the download is complete, use the Android SDK and AVD Manager to create a new AVD based on that component, described next.
In the Virtual Devices panel of the Android SDK and AVD Manager, click New and set the configuration details for the new AVD.
In the dialog that appears, assign a descriptive name to the AVD and then use the "Target" menu to choose the "Google APIs (Google Inc.) - API Level 8" as the system image to run on the new AVD. Set the other configuration details as needed and then click Create AVD to finish. The SDK tools create the new AVD configuration, which then appears in the list of available Android Virtual Devices.

Related

How create android emulator without android studio?

Android Studio 3.2.
I create 2 emulators by Android Studio. Nice.
But the question is:
Is it possible to create android emulator WITHOUT Android Studio?
Our QA need to use emulators for test our applications. But it not need Android Studio.
How QA can create android emulator without Android Studio?
There are a lot of 3th party emulators out there, which are quite easy to use and fast to set up. Just have a quick look in your favorite search engine. But here is a short list of better known ones:
BlueStacks
Genymotion
Nox App Player
MeMu
ARChon
KoPlayer
They should all be able to run your app on a pc to show someone. Have a look on them and inform yourself about the licensing and features.
1 - Download Java JDK from the following link and install: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
2 - Download the Android SDK from the following link and install: https://android-sdk.uptodown.com/windows/descargar
3 - Download Intel HAXM from the following link and install: https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm
4 - Start the SDK Manager, install the tools and platforms you need.
5 - Start AVD Manager and create new emulator.
Yes, we can setup Android Emulator without installing Android Studio. We have to download commandline-tools and use sdkmanager, avdmanager, emulator tools to make an emulator and run it.
Ref:-
https://stackoverflow.com/a/65537217/11620356
https://stackoverflow.com/a/65563126/11620356

Create Android Wear Emulator Without Google Play Services

I'm using Android Studio 2.3.3 and I need to test my app on an emulator without Google Play Services. I know that it was pretty easy to create one using the old device manager (as described in this question), but I can't figure out how to do it with the new one.
The SDK Manager tells me that the system images that I want/need (API level 25) are installed:
Android Wear Intel x86 Atom System Image
Google APIs Intel x86 Atom System Image
At the "Select a system image" step for my new virtual device, only images with the Google APIs are presented under the "Recommended" tab. I've checked "x86 Images" and "Other Images" but no options without Google Play Services are to be found anywhere. I've also looked through all the settings options available at the "Verify Configuration" step without finding anything useful.
Does anyone know how to do this, or is it perhaps in fact no longer possible?

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

VS Emulator for Android: Google Play Store Crashes After Fresh Install of Gapps (Google Play Services)

I've installed Gapps (Gapps CyanogenMod 13, Android 6.0 – Marshmallow (for Android 6.0 Gapps also) HDPI / MDPI / TINY: gapps-600-base-20151016-1-signed.zip) on my Android guest OS on VS Emulator for Android (using the 5.7" Marshmallow 6.0.0 XHDPI Phone API Level 23 device image) per https://stackoverflow.com/a/31564712/229011 (and got a success message in adb) and the only thing that is surfacing after restarting the emulator and guest OS is the Google Play Store. Launching it just opens a blank white screen which promptly closes.
I've even tried drag-and-drop install of the gapps zip and it says it is successful and prompts to shutdown (which the adb method didn't do), but there is still no change.
I was having the same issue and then I added my google account to the emulator and it worked..
Settings -> Accounts -> Add Account -> Google
After that I was able to open "Play Store" and update google related services like "Google +" so that they ran.... Now I have a google map I can use in my emulator :-)
I've done this with the API Level 21 emulator using the 5.0 Gapps package

Android Eclipse OSX Creating AVD using Terminal launches AVD Manager

I'm new to programming and working with Eclipse on a Mac. I'm trying to create a new AVD with Google Maps Support and when launch 'android' (in the SDK tools folder) I get "No command line parameters provided, launching UI". This launches the Eclipse Android SDK and AVD manager.
My question is how do I create a new AVD with Google Maps support? All of the information I've found seems to use commands from terminal. My issue is when I try to use terminal it launches the AVD manage?
Any help is appreciated as I'm very new at this.
You can easily do it with the GUI: Launch the AVD Manager by using the android command in the tools directory. In eclipse you can also access the tool from Window > Android SDK and AVD Manager.
Click the "New" button to create a new AVD.
In the dialog that appears, specify a name for the AVD and select the system image target that you want the AVD to use. Select one of the Google APIs (Google Inc.) targets, making sure to choose a version whose API Level matches the android:minSdkVersion attribute in your application's manifest.
Configure the other options you want and then click "Create AVD".