Emulator vs Phone which one to rely on? - android

I am almost done with my app..when i run it on the emulator ,at certain points,
it is very slow and what i see is undesirable..when I run the same on my phone (xperia X8)
it works fine.
I really tried understanding why this is happening but of no avail!
What should I do now? run some more tests and try optimizing or just
release it in the market?
Is what I am seeing expected? Any info will be appreciated

You really should buy as many Android phones as you can. You definitely should have one with a physical keyboard, one slate phone, and one for the lowest API you are supporting. Personally, I have G1, Droid, and Nexus S that I test my apps on. Its so much faster than the emulator and easier to use. Its also a better metric of how your app works due to it being on actual hardware.

The emulator will always be slower than a real device (most likely, slower than any real device), so don't worry too much about it.
However, due to it's slowness, it can highlight areas where you may want to spend some time optimising your code that you may not necessarily find on your hardware. This is especially true on portable devices with limited CPU power, resources, and electrical power available.
It may be worth trying to find out what is causing the slowdowns in the emulator - if it's regular enough and accompanied by (for example) high CPU usage, then while a physical device may handle it better, you may find that you are unnecessarily consuming battery power and your users may not thank you for that.

The emulator is generally much slower than a physical device, so it's not a problem with your application. As long as it runs well on your phone it should be fine.

I agree with everything dbaugh said. At least at the time of this writing, the emulator is of limited use. Google has acknowledged the limitations of the current emulator and indicated they are working to revamp it. But until that happens. Stick to hardware testing.

Related

Android Emulator vs Real Device [2013]

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?

Can I simulate a specific mobile phone using the emulator?

I've developed an application which seems to work on most tablets/phones I've tested it on (S2/S3/S4/Xoom/some emulator configurations etc)
However, I've noticed a few complaints around a "Pantech Burst" - I can't seem to find any of these phones to pick one up (possibly it's specific to the US) and thought perhaps I could simulate one.
I know its 480 x 800 pixels, and has 1GB of memory
http://www.gsmarena.com/pantech_burst-4429.php
Is it possibly to simulate this kind of phone?
Or are some phones inherently different based on hardward that you could never simulate?
(I have a gut feeling it might be related to mp3's and Soundpools, but I'd rather prove it)
Short answer: no. In my experience if you have device-specific problems really the best way to debug them is to get your hands on the specific device.
Failing that, I can recommend integrating some kind of crash-reporting framework into your app, if you haven't already. These really help in capturing, tracking, and sending errors (with stacktraces) to you and have helped me fix problems on devices I can't get my hands on.
One I use is bugsense, there is also ACRA and others.
http://www.bugsense.com/
https://github.com/ACRA/acra
If you're having a problem on one particular device, then it is likely a hardware + software bug, and simply simulating the hardware configuration will not solve your problem.
That said, you can always duplicate the hardware by setting the RAM, screen size, storage etc. to its specifications. You probably won't get the same processing speed due to the fact that you're on an emulator.
If getting device is not really an option for you, you might want to consider using the Apkudo service, assuming they have the device your app is having trouble with.
You submit your app, and they run it on their set of devices using Monkey, returning to you a logcat and a stack trace when the application crashes on a particular device.

Android deployment is slow, how to improve it?

I'm developing an android application, since there are many assets, the generated apk is near 10M. Now deploying it to a simulator is very slow, often takes me 3 or 4 minutes, which is unacceptable.
I've used Robolectric to test most of the logic, which is very fast. But sometimes I still need to use emulator(e.g. adjust the UI), which waste me a lot of time.
Is there any way to make it fast?
This is my experience, too. Debugging with the software emulator is very slow.
It is much faster to use a real device in debug mode. However, you may run in other limitations
Well since somebody suggested Android x86 as an alterante testing Emulator, I'll also present my favorite. This might not be an alternative for everyone but for me it's perfect! Use the Bluestacks Player. It runs Android 2.3.4 and is very fluent and fast. Sometimes even faster than a normal device. The only downsize is, that you can just test Apps on the API Level 10 and just on one screen size, but it's perfect just for testing if it's working or not. Just connect the Player with the adb by running
adb connect 127.0.0.1
After compiling it installs instantly. Very impressive, considering I have a rather average computer hardware(dual core with 4 GB of RAM)
I've found android-x86 image on VirtualBox many times faster for deployment than an emulator running on same machine, sometimes even faster than a USB device.
EDIT
Please use the android image provided by vmlite, not the one provided by android-x86, and refer to this important question: How to change the screen size of vmlite android?
Actually, I absolutly never use the Emulator, which is way too slow in every situations.
I test and debug my apps directly on real devices (and use the ADB screenshot features when I have to pixel-check some screens..)
Hope this helps...

How to run HoneyComb emulator faster on Windows?

Is there any way to get the emulator work normally ?
Its still very slow and useless, I tried adjusting the cache size and Ram.
My system configuration is quite good, are there any tips and hints to speed up the avd ?
Not much you can do, but Al Sutton lays out some things that can help a bit.
http://blog.alsutton.com/2011/01/27/the-android-honeycomb-preview-emulator/
For serious development, you'll need a Honeycomb tablet.
You may have heard the many complaints about how slow the Honeycomb emulator is. And indeed, the Android emulators have long been slow. Certainly slower than most phones. But Honeycomb is slower, so much so, that even Google engineers have admitted it makes more sense to develop testing on a real tablet.
Now my experience has been a little surprising: on my 1.6(?)GHz Pentium with 4G of memory running Win7, I have been surprised at how fast it runs. That is, I was prepared for the worse, yet found the response time to taps surprisingly reasonable.
That said, it is still noticeably slower than the 2.2 emulator. But not as slow as the real hardware we had to suffer with in the 80s;)
Finally, not only the emulator, but the whole SDK (including that memory hog Eclipse) become a LOT more usable when you have at least 3.5G of memory available. This means a 4G stick. When I was trying to run the 1.6 SDK under Linux with only 2G, it was frustrating how often Eclipse locked up. But with 4G, it is fine. So upgrade your memory to at least 4G before you worry about other measures, such as faster CPU.

Do I need a Android phone for creating android applications?

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?

Categories

Resources