It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
As the title says, how "good" is the Android emulator?
I don't have an Android phone but would it be possible to develop purely using the emulator as the testing environment?
My initial questions about it:
Is the emulator as responsive as a normal android phone (of course this depends on the exact phone but in general)?
Is there a way to control the memory on the emulator?
Has anyone had issues that have been flagged on the phone but not the emulator? or vice versa?
What's your normal testing procedure to test on both throughout, or emulator recursively and phone at the end?
Any feedback would be appreciated.
Thanks,
Q: Is the emulator as responsive as a normal android phone (of course this depends on the exact phone but in general)?
A: Absolutely not! The worst example is the 3D, which is, afaik, only software emulation.
Q: Is there a way to control the memory on the emulator?
A: Please specify, the size of the SD-Card is configurable, the RAM/VM-Memory... I don't know.
Q: Has anyone had issues that have been flagged on the phone but not the emulator? or vice versa?
A: Each device has his own customization. On the emulator you can only change the screen resolution, but caution: the size of your Emulator screen depends on the pixel density you set up. So what might look good on your big emulator could be too tiny on a real device. And don't forget, a finger is much bigger and not as accurate as a mouse cursor.
Q: What's your normal testing procedure to test on both throughout, or emulator recursively and phone at the end?
A: Functionality is tested during the implementation mainly on a (fast) device, like a Nexus One. The real test after implementation will be on as many devices as possible. The UI, too (most differences there)
Since I have a device which is has the latest SDK, I prefer testing on the device. Thats not necessary for programming an app, but please: don't publish an app without at least one test round on a real device :)
Yes, the emulator is very fast.
Yes, you can set the RAM size of the target you wish to emulate.
I'm sure someone has, but I haven't.
I usually test on the emulator during development, then on my G1 when I'm ready for longer term testing. After that I test on the emulator when checking compatibility with 1.5, 2.0, and 2.1 targets.
See here for what options targets support. Note there is a GUI tool for setting these up as well.
To answer the general question about how "good" the emulator is you need to look at what the emulator is.
The emulator is a piece of software (qemu) that is able to run arm instructions on a developer machine using emulation. This means that the emulator will run an android platform similar to what is running on a physical device. This setup is better than using a simulator where the platform is compiled for the development machine and not for the target hardware. There is however a number of limitations such as
peripheral support - a mobile platform includes a number of companion chips such as bluetooth, wlan, gps, radio access, graphics acceleration etc. All of these are interacting with the main CPU in ways that are not predictable and hard to simulate on the emulator. Some are supported in a limited way such as internet access while others are not supported at all such as bluetooth.
performance - the emulator is not a real processor and may not use physical accelerators available on an actual device. It also uses the host machine hardware for a lot of things meaning that memory access and similar items behave differently compared with testing on an actual device.
The general rule is that if it is possible try to do as much testing as possible on a device to avoid surprises in the end. The emulator is good for things such as testing general functionality, initial testing to avoid obvious bugs and checking that layouts and UI look decent at different screen sizes. When it comes to any performance critical testing or behaviour when interacting with the outside world, such as network interaction, the emulator is not recommended. It may tell you that your application has serious issues but do not trust "good enough" on the emulator to be good enough for the real world.
I'm going to answer #3 only, because the other answers have been covered already.
There's definitely some issues that are only present on the emulator and not on the device itself. One big one is that airport mode simply doesn't work on the emulator; internet still works despite turning airport mode on.
Also, if you're just using a stock emulator, you can't access the market, which means that any way which your app may try to interact with it can't be tested via emulator.
I know there are some other smaller issues which I've run into between an actual device and the emulator. There are enough things such that I highly recommended you don't develop solely on an emulator.
With emulator only your testing will have more mock testing to cover:
-touch
-sensor
There frameworks to plugin to simulate sensor/device movement, camera by using your webcam, etc.
You need memory to use emulatord like AVD emulator, emulator is good for testing but sometimes it can crash without reason.
Yes you can change this settings many times.
Some time ago I cannot emulate accelometer, but right now I can.
I prefer to test my app on real device. I prefer testing my app on real devices (if my frends cannot creash it and JUnit tests works then it shouldn't be a problem), but I test different screen size on emulators.
Related
This is related to question Android Emulator vs Real Device
What is the current state of art of Android emulators and what are the differences that developers should be aware of. I'm working on an app that uses bluetooth and thinking of adding a feature related to phone calling. Since I can't afford to test on all real devices so what should be the guidelines for developer to test such apps on emulators ?
Genymotion rocks. According to the blog post of Cyril Mottier it is even much better then the hardware devices.
http://www.cyrilmottier.com/2013/06/27/a-productive-android-development-environment/
I test basically everything on several real devices. The only thing I use an emulator for is making sure layouts look good on the configurations I don't have available(I don't have a 7" tablet, for instance). This is only after just about everything else is done.
Functionality is going to be nearly the same on any real device, and the emulator is no guarantee, since it doesn't seem to act like any real device in some cases(openGL, for instance).
Testing usability on a desktop with a mouse just doesn't make sense, unless you're writing something that going to be using that input method. There's a big difference between swiping with a finger and click-dragging with a mouse.
Even if you have the fastest emulator/virtualizer in the world, how can it be any faster than just picking up the phone next to you?
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android Emulator vs Real Device
Is it better to test your app on an emulator or on an actual Android device? As in to test your app while you are still developing it.
In addition, does testing on the emulator gives you more computing power than actual devices?
It is always better to test on a real device, as the emulator lacks certain inputs like sensors etc. (especially the older version of it). You will also have problem testing services like In app billing and LVM as the emulator doesn't come with Google Play, and the accounts that can be configured on it are limited.
The best solution is to have a few devices to test on, and use the emulator for testing different screen sizes and how they react to your layouts. There was a Google I/O talk this year that gave you a breakdown of what devices you needed to test on to make sure you have maximum compatibility. I don't remember which one though, sorry.
Concerning the development period,you should test the application on emulator first so that you can test it on multiple targets having different versions eg:2.2, 2.3, 4.0 to find out the loopholes and the resolution issues.
After completion of development you can test it on your actual device for hands on experience.
I would say it certainly depends on your needs. Since you are developing an application that will be consumed not by yourself actually, it will be consumed by your targeted audience and what will they have? They will definitely have real devices to use your application.
There are some features that are not available or really hard to configure on the emulator, like for example you are developing an app that uses a bluetooth feature.
The emulator is certainly designed for developers to test their apps in a virtual environment with limited functionality.
It really depends on the kind of app you are creating. If you are creating a game that requires the accelerometer then a real device would be beneficial. Yet if you are creating an app with a simple layout and you want to test for different screen dimensions and so on, the emulator is pretty good with this.
Yet you should always have a real device, since the emulator is very limiting.
Android simulator provides a platform very similar to the actual phone, so if your application is running in the simulator, it goes to 94% given the same result in the actual phone, except that sometimes there are modules that must be compulsorily test on a phone like the GMap, Push, screen size..
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I'm going to be writing my Android app soon, and thinking about buying a solid android device to develop on and play with. My question is for you guys, assuming you wanted to develop and test your app on an Adroid device, what would you recommend?
Samsung Galaxy looks promising, but I know choosing a good dev phone is one of those things you definitely need to choose wisely on. The Android device landscape seems to be broadening every day, so it'd be good to hear about the latest devices for developing. Perhaps I could just get a cheap clunker and it won't make a difference?
I'm sort of a nerd, so if the device is pricey, but has some cool features that others don't, then I'd still consider it. However, I don't want to waste too much money on features that I may not need (or that may distract me ;)), like HD video, although it looks like a lot of phones have HD support anyways.
Tablets seem a bit much, but I'm still open to it... if you're loving your Android tablet for developing, let me know about it. I could see some benefits like being sure my app will run on Android tablets and different resolutions.
Any caveats I should be worried about? I have a buddy who was developing Android when it first came out and I remember him complaining that he could never update his device, since the updates were always restricted for some reason. Is that still the case?
If you can speak to any of these points, I'd be happy to hear them.
Also concerned about using the location based stuff, like gps, will I need a contract?
I'll be developing on my Macbook Air OSX, if you have any additional input as far as devices go, and using a Mac, that would be great too. Thanks!
You should develop against the Android 4 platform, but during the course of development, you will figure out which APIs you are using. The level of APIs you are using determines which minimal OS you will support. There's 2 manifest settings in play here: target API (15 aka ICS), and minimal API (depends on what you use).
To get a good mix of API support and broad coverage in the consumer market (using the dashboard that #Basic pointed to), I tend to point people at API level 8, which is Android 2.2 (aka Froyo). You'll hit roughly 93% of people out there and you'll get the APIs you need for most development. If you know you need newer APIs, by all means use them. The world will catch up, it may just take some time.
I typically point people to get a Nexus phone or XOOM tablet. You need the reference design so you can stay on top of the official releases from Google as quickly as they come out. The AOSP builds are important to follow, but they aren't the only game in town. After that, if you want to be serious about it, you should pick up one phone each from the major OEMs so you can deal with the differences in the customized platforms (Sense, Blur, Touchwiz, etc.)
Disclaimer: I work for Motorola. MOTODEV Studio is my teams' product (thanks Basic!)
Samsung Galaxy Nexus, Good because it is a phone that is supported directly from Google.
Samsung Galaxy S2, it just has all the features you need
One of those two for spec heavy phones, but you also need a cheaper not so good phone so you can get both ends of the device range, so get something like a IDEOS as well.
All you need to remember is that there is never going to be just one type of device being used, there are hundreds, if you have a phone thats close to the bottom and your app works almost as well as a phone as the top it will be good, because you will be able to catch the whole range of customers.
Also for location based things all you need to do is put permissions in the android manifest and it should be good, users are notified about these when they download the application
Mac can be good for development, its supported by Android as well so I dont think you will have a problem, when I went to the Android devs lab it seemed to be that all the Google guys had macs anyway
It depends what you want to support. There's a whole spectrum from the HTC Wildfire up to Galaxy S2 / HTC One.
What versions of Android are you going to target? Some people are still on 1.5!
Regarding updates: Google releases updates at their own speed. The problem is that before that update reaches a given device, the carrier usually customises it to include branding, mandatory aspps, etc... Which can take an indeterminate length of time or may not happen at all. This was one huge benefit of the Nexus One - it wasn't branded so updates were available as soon as they were released.
Regarding Development: eclipse is available for almost every platform and is a great starting place. MOTODev Studio is based on eclipse and is excellent as it comes with templates, pre-configured emulators, etc...
Location Services: Android uses 3 approaches to get your location: GPS (Works poorly indoors, can be slow to get a fix, quite a battery hog), Wifi (Google have mapped the location of a lot of wifi networks - thus if it can see a known wifi network, it knows roughly where it is) and finally network (It knows the location of the cell tower(s) your phone is talking to).
None of the above needs a contract but Wifi requires an internet connection (to perform the lookup) and Network obviously requires your phone to be in range of and allowed to talk to a cell tower - which usually just means getting a sim for a network which covers your area.
Note that when getting location on the device, you can opt to have coarse of fine-grained location information. Coarse doesn't fire up the GPS (They also require different permissions)
See this page for more info about location
Personally, I would recommend the Toshiba Thrive 10.1 Inch Android Tablet.
It has:
1 GHz Nvidia Tegra
1 GB RAM
Full Size USB Port
Full Size SD Card Slot
Full Size HDMI Port
Mini USB Port
Can be upgraded from Android 3.1 to 3.2 or 4.0
And it usually only costs about $200-250 depending on how much memory you want.
I started developing android applications. And am testing with the android emulator. Do I really need android phone before releasing it for public usage?
Short answer No. You can test and build a android application package with the SDK and an emulator. But I would say there are usually many things which it would be wise to test on a device.
Personally I have noticed that the emulator does not give a good indication of response times for UI controls. It is usually necessary to move functionality which has long processing times into background threads to maintain user interactivity without the 'force close' pop-up. Testing the effectiveness of your UI responsiveness must be done on a phone to be meaningful.
Network connectivity is another aspect which can be vastly different on a phone, 3G or wifi.
Device sizes and Android platform versions can be tested effectively on the emulator.
Some phone allow hot-swapping of the SD card (replacing the SDcard without turning off the phone). I am not sure how to replicate this on the emulator.
There may be many more things which may only become apparent when using your application on a real device. I would strongly suggest to always test under real conditions when feasible for any commercial project.
From a technical perspective there's no reason why you can't develop purely on the emulator. You're not going to be able to test on every available device, so there's always going to be possibility of device specific bugs that you've missed.
However, I'd strongly recommend getting an actual phone to test your application on.
For me the biggest difference between an actual device and the emulator is the difference between using the interface with your fingers and using a mouse. Interactions which make sense in the emulator sometimes don't work as well when you start using touch on the screen. So if you develop purely on an emulator you'll won't lots of little improvements to your UI that would obvious when you used your app on a phone.
You can't feel a real app in your hands until you have a real phone. (I'm telling you as an Android developer)
So, developing w/o real phone is possible, but real phone gives you a lot more experience, fun & usefulness.
It depends on what type of application you're developing, for serious ones you need at least one device to test it on. For complex applications you would need a range of devices, for example with or without hardware keyboard, different navigational button etc. For basic, simple applications you'll probably do fine with just the emulator.
I would imagine with games you would definitely need to test on real devices.
Thanks to you all. I am going to get HTC Legend and test it, so that I can hope that my apps can be used by others :)
You guys suggest me HTC Desire or HTC Legend?
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've been intrigued by all the android world since I first learned about it and would like to get my hands dirty developing for it. The question that comes to mind is if it's worth buying the unlocked phones that Android sells directly or not.
Those phones (link) quoting the Android page:
Run and debug your Android™
applications directly on a device.
Modify and rebuild the Android
operating system, and flash it onto a
phone. The Android Dev Phone 1 is
carrier independent, and available for
purchase by any developer registered
with Android Market™.
Please note that this device is
intended for development purposes, and
may not include certain features found
on consumer Android devices.
So will it be worth it to purchase one of those as a tool for app testing as opposed to developing and testing just on Eclipse or one of the other IDEs and emulators.
-Have you tried it, do you own one?
I'm assuming they have the same specs as the HTC Dream and the HTC Magic, since they look exactly the same although they have a 'developers edition' custom black design not that I really care about the design for this particular item.
All comments are welcomed,
Thanks in advance.
Update:
I'll leave it open until tomorrow to see if there are any more answers, then I'll just pick the most voted since it's really a subjective question with no good or bad answer.
It depends what sort of applications you wish to develop. I find that the emulators very accurately reflect how things work on genuine devices; you can seamlessly connect to either an emulator or a dev phone using the command line tools, the Eclipse tools, the debugger etc.
Also, while you can flash your dev phone to a new OS version, HTC often lag behind (e.g. there's still no 2.0 image available) and it's much easier and faster to just use the emulators. The emulators also allow you to create and test with different screen resolutions, whereas the two dev phones available are only "standard" resolution.
I find it's quite rare that I need to use my ADP1 dev phone for development -- my rooted consumer HTC Hero works fine for most of the development I do.. allowing me to pull files from the device etc. Though the only reason I use my Hero rather than an emulator is because I've been working on an app that uses audio recording functionality.
However, where having a physical device would help is where you need to do specific stuff regarding the camera, audio hardware, orientation and compass sensors, GPS, wireless network access and so on. Should you need to connect a debugger to work on hardware-related issues like the above, then you would definitely need a dev phone.
Overall, it's definitely worth buying an Android phone for testing and demonstration purposes, but whether it's a development phone is up to your requirements.
If you plan on developing apps that you intend to put on the Android marketplace, it's absolutely critical to test on real hardware. You can get away with developing on the emulator for quite a while, but at some point, you'll want to use a real device.
That being said, you can use any android phone for development. There are some restrictions on locked devices, but if you're simply developing against the SDK, any phone will work. With android, you can install an apk directly on the phone without special permissions, so the only real advantage to a dev phone is that you can install new roms without having to root the phone.
Personally, I'd hold off on purchasing one of the older dev phones. From what I understand, they only support up to SDK 1.6, whereas the Droid and some of the other new phones are supporting SDK 2.0 ++.
Wait for the release of the Nexus One from G. The latest rumors are that it'll be released on Jan 5th. So it's just a week or so.
I think that you need a real android device whether it's the dev phone or another handset but a real phone is primordial. The emulator is great but you can't get an idea about the execution speed of your app until you use it on a real phone.
As said before there are a lot of rumors about the nexus one so wait and see!
As for which phone to buy (assuming you're going to get one) I think ablerman is right. I'd wait until January to see if there is going to be some new hardware available.
With regards to the more general question of should you buy one, I think it depends on what you're doing. For the most part, the emulators are fine. They can emulate GPS (you can even load KML to simulate a path), SMS, phone calls, etc. They cannot however emulate acclerometer/compass/orientation sensor data and actually will crash (actually I believe it hangs...) if you try to run code that relies on it. Also, it's difficult to actually debug phone-call related functionality without the dev phone.
They're good phones, I've used the Dev phone 1 (the G1/Dream) and it's nice. It also is a bit faster than the emulators and if you're writing something like a game, it would be really good to test it on the actual hardware.
All in all, it just depends on what you're writing. They're definitely fun to play with regardless as you can do pretty much ANYTHING you want on them.
Good luck with the decision!
I've been developing with the emulator since June. I've found it to be a very near substitute for the real deal, and it's easier to switch between handset configurations/versions. However, not knowing how quickly my apps will run is a concern for me.
The reason I've personally held off buying a handset is that 2009 was the wrong year to buy one. I have a feeling 2010 will very much be the long-awaited "Year of the Android".
+1 to Christopher and I will add - the emulators are great but having a physical phone will give you instant access to the Android Market to verify publishing, statistics and user comments. I also believe using your own app on a physical phone will help you to develop a better app. You do not need a development phone - but at least one physical phone - absolutly.
FYI. Belgium is one of the few countries where it is possible to buy any mobile unlocked. Indeed, the Belgian regulators forbid the forced bundling.
One more Pros for buying a real developer phone :
HierarchyViewer does not work on user builds (i.e. with devices
available in stores.) This is for security reasons.
See the original thread
Hierarchy viewer can be very useful if you have problems with layout being slow, although I don't think it would worth buying a real Developer phone only for this.
As some people made workaround for that problem : https://stackoverflow.com/a/7801475/62921.