developing phonegap apps for android - android

I've developed a few phonegap apps for ios and now I want to create android versions for one of them. The thing with android is, of course, that it is used on so many different devices. I understand that the safest way is to test the app on every single device that I'm targeting, but is there a smart and easy solution to test for as many devices as possible without buying 20 new phones? Is the emulator, for example, reliable?
Any hints and tips from you android phonegap guys and girls out there much appreciated!

You can try Genymotion. It has a wide range of devices and they are reliable as far as I experienced, you can get it here;
http://www.genymotion.com/
Also you can try virtual devices from Eclipse. Plus if you try a few real devices, it would be enough I think.

You are right, there are hundreds of devices no one tests them all.
The best idea is to test on a few physical devices of varying API level and screen size. That is of course not always possible so best idea is to use the built in emulators.
Android SDK comes with an Android SDK manager, this enabled you to download system images for every API version.
You can then use Android Device Manager to create new emulators, running different screen sizes and images.
This should enable you to test quite comprehensively.
Good luck.

Related

Is there a repository of Android Emulator AVDs?

I need to test web apps on a representative selection of Android phones and tablets. I don't have the budget necessary to purchase a large selection of physical devices. I'm looking for a collection of AVD files to use with the Android SDK emulator to accomplish this. Does anyone know of an existing repository or collection of these? Or do I have to make each one individually figuring out their specific resolutions, memory, Android versions, etc for each? I've created one based on the Nexus S definition provided in the SDK's AVD Manager, but I need Samsung, HTC, etc ones too and am not sure where to get them. Each phone manufacturers dev portal is a little different and I haven't found anything as straight forward as "Here's the link to our AVDs" on them. Thanks.
If you aren't required to use the AVD from the SDK, you should checkout genymotion. They use a dedicated virtual machine to emulate real devices, so it's really really fast. They've also custom made a bunch of real devices (phones and tablets) such as the Nexus 4, Galaxy S4, HTC One, and Xperia Z. It looks like they mostly support API 16+, but there's a preview for API 9 at the time of writing this.
Yes, there is this one, thanks to https://github.com/j5at and other guys:
https://github.com/j5at/AndroidAVDRepo
Or do I have to make each one individually figuring out their specific resolutions, memory, Android versions, etc for each?
You will need to define whatever emulator images you want yourself. The norm is to define some emulators with a mix of resolutions and OS levels, not necessarily specifically trying to hit any particular device model.
Bear in mind that there are plenty of virtual test services that you are welcome to take advantage of as well. You should already be familiar with these, as they are commonly used in Web development for testing browser/OS combinations that you do not have at your disposal.
Each phone manufacturers dev portal is a little different and I haven't found anything as straight forward as "Here's the link to our AVDs" on them.
There are no dedicated emulator images for the vast majority of Android devices on the market.

Test on emulator or actual device? [duplicate]

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..

Testing Android apps on device

What is the recommended way of testing an app on a device? The emulator is slow, mostly unresponsive and a cpu beast on my machine, so I use my phone to test my app. When I make a change to code, Eclipse builds it automatically, and then I debug it on the device. Is this the most efficient way to test small changes in code?
Android has some information on testing here. Personally I've found that testing code is much faster on a device. Other options without a device is to use something like Android x86 and run it in virtual environment like VirtualBox - this can be faster than the emulator. In my opinion, to really make sure your application is working as expected (especially with graphics and memory usage) is to test with the device(s) you intend to deploy the application on.
That's how I test my code, the emulators and on an actual device are the only ways I know of. I usually use an actual device, but I think you can keep an emulator running to speed up time a bit, but not too much.
It's in my opinion a good way to check the general functionality of your application. If everything works fine, I would use the emulator to check with different versions of android/screen sizes/resolutions etc. Maybe you can ask a friend who has a more powerful PC. The best possible thing is of course that friends/family/relatives etc. own Android devices so you can test your application / let it be tested on real devices.

What is the most convenient device for Android development?

I'm currently developing apps for iOS, but I also want to start developing for android. The device to use for iOS development is not too hard of a choice, because, well, you don't really have much of a choice, either an iPhone, an iPad or an iPod Touch, end of story. But for Android, you have a much wider spectrum, there are many different models and many different brands. So, what would you recomend for Android development. I don't want to spend that much money, but also I want a device that won't get obsolete too soon. Any suggestions?
The Nexus series of dev phones should be an obvious choice since they are the first ones to be updated with new releases.
Also, as rony l pointed out, they are installed with vanilla Android and are not contaminated with 3rd party software.
I would choose the latest Nexus Series phone since it is the most 'Google Android' phone out there. They seem to be the first ones to be updated when new releases of android comes out too! The Nexus S is a good shout since it's the latest one.
Nexus S is a good choice.It's new android phone from Google and is quite well for development. You can read more here: http://www.google.com/nexus/#/tech-specs . But of course it's better to have some devices for testing.
You are best to use a Google branded phone since it has no extra "skins" on top of the OS like most other brands do. The Google Nexus series is discontinued now, so get a Pixel phone instead.

Can an Archos 28 be used as a test device for Android development?

I would like to start doing some Android development, and would like a cheap device to deploy apps to, just for testing and demo purposes. Is it possible to deploy apps to, for instance, an Archos 28? I don't know much about Android development yet, and haven't found a good answer to this question elsewhere. Thanks.
I can recommend the A28 for development. The user experience is rather crashy, part of the problem lies in the low RAM (128Mb is very little for an Android device). But I developed JGame on an A28 and did not run into firmware bugs. It also runs Flash 10.x in case you want to experiment with that.
I second that you should in particular worried about devices with a larger display. I found that graphical performance can be much worse on those devices. The A28 has a pretty good GPU considering it has several times fewer pixels than the average Android device.
Yes, it is running android 2.2 froyo. That should work fine for development purposes. Just keep in mind that some people will be using your app on cell phones that may be "larger" than the archos' screen size.

Categories

Resources