I'm new to Android, but have published iphone and bberry apps. I see that I have to create an emulator using the SDK, before I can write and test an app. Why are there no default emulators? Why not at least a Nexus one, or HTC hero emulator shipped with the product?
Sure its supposed to be flexible, but why not make it easy to create hello world and play around with a virtual Android phone? Both blackberry and iphone come with default simulators when you download the sdk.
Thanks,
Gerry
Since you can create an emulator configuration - or Android Virtual Device (AVD) - with three mouse clicks and typing a name I don't see too much wrong with the Android Emulator that ships with the SDK.
The reason that there's no Nexus One or HTC Hero emulator is that these ship with proprietary code which can't be given away free with the emulator.
The Sense UI that comes with the Hero is written by HTC only for their handsets and some of the Google Apps, such as Google Maps, GMail and YouTube are owned by Google and are not part of the Android Open Source Project. I believe Google charge handset makers for these apps and if they included them in the SDK then anyone could have them for free.
The SDK includes emulators for all currently released devices, you just have to create and name them.
To create a "Nexus One" emulator, you would create an AVD that is using the 2.1 SDK, and has a screen size of WVGA800. It's as simple as that.
It used to be this way, but was changed to make developers think about what platform version / configuration they are developing against (and to allow multiple platform AVDs to be created).
Here is a quick way to launch an emulator running cupcake:
$ android create avd -n android1.5 -t
$ emulator -avd android1.5
What about other features.... i would love to make my app work on all android devices but, i dont own all of them, just 1. So i have to create an avd for each possible hardware configuration(phone). meaning i have to track down the exact specs for say 5-10 phones? resultion, density, aspect ratio, input types, multi touch? proccessor FPU? some do some dont. etc etc. something needs done.
I'm confused by your question. The SDK ships with an emulator. You just have to create and configure an instance of it first through the SDK and AVD manager.
You can create appropriate avd using android (android.bat) in folder /tools of sdk. Also you can choose resolution, sd card, API level. It's really easy:)
If you want to write for Nexus - why not? Choose appropriate sdk level and enjoy.
Related
I am trying to run some tests of an Android application I am developing. The question I have is if it is possible to create an actual android device with its settings not just skins and the device's layout using Android Studio or a Virtual Machine, in order to see how application operates on other devices.
Would really appreciate if anyone could help.
You can use AVD Manager in Android Studio. You can create Android VM with it. You can customize :
What Android Version runs on it
The device screen size
memory
camera
storage
You can send custom inputs
Physically moving the device
Custom GPS coordinates
Send sms and call
Change battery level
etc
It is more than a skin, you can access the file system with adb, navigates the settings etc.
What you can't do is having the custom software layers made by manufacturers (i.e. OneUI from Samsung). It is stock Android
The emulator seems to be a standard qemu running a complete android system, so it's not only a skin.
If you want to test on real devices, you can have a look at Firebase Test Lab, which offers actual devices for testing, for a fee. See https://firebase.google.com/docs/test-lab/android/available-testing-devices on how to get the list of devices. Another option is Browserstack, which seems free for open source projects.
I am using Android Studio, my system does not support emulator and I don't have any android phone but I want run android application. Is it possible to run android application without emulator and android phone?
You will always need to deploy your applications on Android OS which is only possible on an emulator or Android-phone when developping native-apps. If you're developing hybride applications, you can run your app in a browser and use browser-plugins to simulate the native features of your device. Please keep in mind that there is more than 1 emulator available for Android. The emulator in Android Studio is one of the slowest available. Try using genymotion or BlueStacks, but preferably, Genymotion.
There are different emulators. You can try installing Genymotion. You need an emulator or an android phone to run your app
No. It does not make sense that you would be able to do so, every application for any device needs a platform to run on!
More importantly, why do you say your system does not support emulators? There are many free emulators available online, I personally recommend you try Genymotion.
UPDATE: My guess is that the error you are getting is due to your computer hardware not supporting multiple CPUs such as those found in modern android phones. It might be possible to turn on hardware virtualization in your computer BIOS (usually you press F2 or some such when you are booting up - but this depends on your particular hardware).
The very first thing I would try before anything else is to download Genymotion (as it was also recommended by the other answers), and at least one other emulator before giving up. Have you tried any other emulator other than the default one that comes with Android Studio? Different emulators likely work differently and they might not need hardware virtualization.
If you are unable to use the HAXM based emulator or Genymotion, you are better off buying a handset device.
Otherwise you are limited to running the ARM based emulation which in the SDK manager looks like 'ARM EABI v7a System Image'. The ARM based emulation should be used with GPU acceleration enabled. Best possible performance would be to use the smallest screen possible such as 480x320, 800x480 or 854x480. The larger the screen in terms of pixels, the worse the performance.
Again the best recommendation is to get a Android phone/tablet and do your development there.
I was reading the Android documentations, the AVD topic.
I have a question.. What's this means?
An AVD consists of:
You can choose a version of the standard Android platform or
the system image packaged with an SDK add-on.
Any thoughts?
This may refer to some of the manufacturer specific images. For example some devices are dual screen or have special hardware. This can be seen in the download/addon manager where there are references to LG and Samsung to name but a few.
Overall an avd is a simulation of an android device including the hardware configuration. You can have more than one, for example I have 3 to simulate different screen densities and android versions. They are great for testing and easy to setup via the avd manager, where you can also set other settings like the default avd.
To setup an avd instance go into eclipse or access via the android SDK folder (where ever you put it) both routes lead to the same GUI.
I created an Android application that I have published in the marketplace. It crashes on a specific device, the Motorola Cliq XT, so I would like to make an AVD of this device and test it in the emulator. I know that I can make a new AVD with the right API level, but what other considerations are there for this AVD so that I can closely mimic the actual device? Are there standard AVDs that someone has released for different phones, or do we not have that kind of flexibility? Thanks.
The Motorola Developer Network site provides instructions for downloading and installing the necessary add-ons to support the creation of a device-specific AVD. Sadly, I'm no longer able to find the actual download page.
Can anyone tell me how do i establish HTC Desire Emulator in my Eclipse.
I have already tried, available packages installation, but HTC is not there in third party packages.
There isn't a specific HTC emulator - rather you use the generic Android emulator and change the characteristics of it to match whatever model of phone and version of Andriod you want to target.
You need to install the Android SDK and use it to create Virtual Devices (AVDs). These can then be used to test your code before moving onto a physical device.
For detailed instructions see http://www.android.com.
Please check this question. You can achieve htc-desire like emulator by setting appropriate values..
The correct Eclipse/Android device configuration for HTC Desire