Android ==> Application development? - android

I am an iphone application developer, all iphones have very similar Operating systems, and the size and everything is the same, so I don't need to create applications specific for each iphone.
But with android there are different phones, different sizes, So How can I possibly know that my app works, and looks fine on all these devices
I don't already own an android but I completed my first application using the simulator. Which android phone do u suggest for testing? I am an AT&T user and Iuse an iphone. Can I simply insert my sim-card in the new android to be able to test my app on the device?

The android virtual device lets you change the virtual hardware to match all of the current shipping phones. There are ways to receive device crash reports from a shipped application to help diagnose force closes or other grievous errors.
You need an unlocked phone to use another SIM card. The Nexus One is available unlocked out of the gate, and comes with an AT&T version. The only AT&T (as sold by AT&T) Android phone (Backflip) is stupidly crippled and should be avoided. You can also buy an Android Dev Phone, which is currently "middle of the pack" in terms of hardware. You can also easily find numerous other Android capable handsets - pick depending on your target market. Some phones are now old: for instance, the G1 is on its way out.

you won't need to worry about different screen size . take a look at Supporting Multiple Screen article . I'm not sure for the late ones because I'm also working with Android Emulator .

1 - Take a look at this Google IO session for load of tips on making your app work across devices. It's not that hard at all really
2 - I'd recommend the Nexus One if you need a phone just to develop on. It's representative of what you'll be seeing in devices in the coming years. If you want a current representative phone take a look at the HTC Legend (Mid-end) or the HTC Wildfire (Low-end). There's also the Droid and things like that but you can only get them on Verizon I think. I'm not too knowledgeable about availability in the US, I'm from the UK.

Related

How can I test my app for a specific device?

I am building an application with React Native but the app not working well on a few android devices. So I need to see what's going wrong but I don't know how to set up an emulator for a specific device. Are these problems depends on phone's brand and model or it just depends on their android versions?
Its not really possible. There's two major problems:
Software. Real devices don't ship pure AOSP like runs on the emulator. They add patches and features and there's no way to know what they actually run.
Custom UIs. Many phones provide custom UIs like TouchWhiz and the like which can override Android behavior
Hardware. If your app depends on things that are very hardware specific, like GPS or Camera, they could have issues due to hardware bugs.
If you just want to emulate a specific OS version like KitKat, or specific low memory conditions its possible via emulator configuration. If you really need to test on a device, either buy one or use a service that allows you remote control over specific devices. Amazon has a nice device farm that you can rent over AWS.
One of the biggest challenges when developing for Android is the wide variety of devices and "optimizations" manufacturers make to their Android versions.
The Android emulator is based on AOSP (vanilla Android) and was only recently published with Google services included. This is the most clean version of Android. You can use the emulator to test UI scaling for different screen sizes but it will always behave like an AOSP Android. Google packs a bunch of hardware configurations into Android Studio which you can simply select when creating an virtual device. You can always create a custom hardware profile with custom screen size and resolution. Some manufacturers also change the DPI value of the OS causing the UI to be bigger or smaller, keep this in mind when creating a custom hardware configuration.
Further, you can use the emulator to test the default behaviour on different Android versions. Again, manufacturers change their Android usually causing slightly different behaviour.
I assume that your question is focussed on different behaviour of e.g. Samsung phones having crashes only occuring in Samsung phones (Samsung can be exchanged with any other brand here). Unfortunately, there is no simple way to test this but getting your hands on the faulty device. One option is to use a cloud based test lab (e.g. Firebase Test Lab, App Center or AWS device farm) to test your code on the faulty device or rent the device at a local shop. Most bigger cities have companies renting phones and tablets on a daily or weekly basis.
In the end you will need if statements checking for a specific device, manufacturer or Android version or any combination of them and doing something slightly different to fix the undesired behaviour.
I know that this is not the answer you are looking for, but it's the best I can offer. To tell a little tale of my worst experience: I had once a bug were calling a crypto function caused a kernel panic on HTC (?) phones. This means the user opened my app and the phone rebooted. I was required to implement the entire encryption logic again just for HTC with Android 6.0.

Developing an Android phone app -- can I use an Android tablet to test it on?

I've developed a couple of Enterprise iOS apps for our users in the field. Some have expressed a preference for Android devices over Apple, and I fully understand. I do not have an Android phone, nor do I want to get one and have a second account to maintain. I'm wondering if I can use an inexpensive Android tablet to reliably test an application that will ultimately be running on an Android phone? The app will need to communicate via internet to a server via cell connection or wifi.
Also, any advice for an Android newbie developer would be appreciated.
Yes you could test on a Android tablet but it would be hard to see how it render on a phone.
You could also use the Android Emulator to test different size and android configuration.
Yes. I developed my first major Android app using only a couple of cheap tablet devices. It's fine; the only thing you can't really test is "what happens to my app when a phone call comes in." Plus if you can get the emulator working under HAXM, or some other similar setup where it doesn't work like a tortoise trapped in amber, you can test on a variety of simulated devices perfectly well.
Other things to consider:
You'll probably want to test your app on a variety of different hardware and Android versions, in particular I'd recommend testing on older devices. This means that you friends' old Android phones are a great source of cheap test devices. I regularly gather phones from friends that would otherwise just end up lingering in the back of a drawer as a "spare" that will never actually get used. Bear in mind that you can use all the features of a phone apart from the actual phone bit without a SIM, including a WiFi-based data connection.
You may find that you can find good, contract-free "pay as you go" phone SIMs. I use a provider whose "credits" don't expire, so I have a phone connection for my test devices where there's no ongoing cost, apart from the actual calls I make when testing.

Porting application to android

I am about to port my application on android. Since I am new to this system I would like to ask for tips on android phones for testing my app. The number of phones is pretty huge so it is pretty hard to choose the right one. Also I wasn't able to find some kind of official chart of system distribution.
I know that it really depends on hardware and how much my app demands from hardware. It is pretty basic app and I am able to run this app at 30fps on iPhone 4S.
I did some research and people are talking about the latest phones but I think that it is not necessary to buy the newest one. Also, is there option to buy for example tablet and emulate android devices on this tablet?
So my goal is to focus on devices people have the most.
Thank you for any advice.
You can run many of your tests on the Android emulator. Using it together
with the DDMS will allow you to simulate several real life situations
(arriving call, arriving sms, change position...)
You can use BlueStacks which is an emulator put on steroids.
TestFairy and UTest are awsome communities for crowd testing were you can test ~any device you can think of.
Still, it is a good idea, especially if you plan your run at Android to be long,
to maintain a small stash of real devices.
Which devices should you buy? Which OS version should they run?
The Android dashboard is the official source for answering some of these questions. It gives an
up to date statistics of worldwide distribution by OS version, svreen size/density and more:
OS Distribution
Screen type Distribution
So, true to July 2014 you would want devices running Jelly Bean, Gingerbread & ICS and you screens of types normal/hdpi, normal/xxhdpi and normal/xhdpi. This list can grow but even this will provide you with a good sample of the Android device ecosystem.
As for manufacturers, the picture is clear: Samsung is the winner. Exact number &
distributions are harder to find here, but a Google search might help.
If my memory serves me write some 65% of all Android devices are Samsungs made with
Galaxy S3 taking 15% (of ENTIRE Android market) and Galaxy S4 = 10%.
Device screen features:
Galaxy S2 is normal/hdpi
Galaxy S3 is normal/xhdpi
Galaxy S4/S5 is normal/xxhdpi
These will probably be your best bet. You will do smartly to install on them 2-3 different OS versions, at
minimum Jelly Bean and ICS.
The Android Development Tools in Eclipse and Android Studio both have emulators that can be used to emulate different devices, including tablets and phones. You don't need to buy anything to be able to test your app on an emulator. The emulators run on your computer.
For more information
As for what devices most people have, while I don't have official statistics, looking at my own applications' downloads, most people are using either a Nexus 4 or Nexus 5.

Which Android device to get for app testing?

I am beginning Android app development and I would like to know which device would give me the most comprehensive testing environment. I would like my app to be compatible with the most number of devices without breaking the bank by buying a dozen devices. Just testing on the emulator is not an option because it runs at 1/10th of normal speed.
OS Version
Should I purchase a device with the most common OS? As of now, 2.2 is the most popular. Obviously, a 2.2 device wouldn't be able to test run an app made for 3.0. But is the reverse also true? If I buy a 3.0 device, would that allow me to test all lower versions?
Tablet or Phone
Given that my app won't be dealing with phone calls, should I be buying a phone or tablet? Are the two sufficiently the same except for resolution? Has your app ever worked on a tablet but failed on a phone? The Apple iPad has a neat emulation mode for iPhone apps. Is this feature also available on Android tablets?
Price is also a big consideration when choosing a tablet over a phone. I'm not going to sign up for another cellular plan, so most phones would have me fork over $500+. That would come out to be the same price as the Motorola Xoom. But arguably Android phones are much more popular than tablets, so a Xoom wouldn't let me see what most of my users would be seeing.
In general it's up to you, I suggest you Google Nexus S, because of NFC module in that phone (only that phone nowadays as I good know have NFC), besides that it has everything you need. Big plus for screen.
Android 3.0 is made generally for tablets but of course you can write application in 3.0 and run it on 2.2 or 2.3 just look for backward compatibility, and use reflection.
Also good to know that it does not depend of your phone which version you have it's up to SDK ver which you choose during creating project, in general you can set 7 as min SDK and test it on phone with 9.
If you are creating applications which requires a lot of custom drawing/animating such a game, then a slew of devices would be ideal to test against resolutions, DPI, RAM, CPU power, etc.
If you are using more of the native components then you do not have to worry as much about the different screen types and sizes as these tend to scale very well.
This question was brought up at GDC's Android Developer Day, you may be able to find the video online. Basically, it boiled down to trying to get one of each kind of device, low end, mid, high. It was also recommended that you built for the newest SDK, then start building against older ones, fixing, testing, rebuilding.
Therefore, I would personally recommend the Nexus S.
The company I work for does Android development on the original G1, HTC Hero, Samsung Epic 4G, and HTC Incredible.

Dell Streak for Android Development?

I am an iPhone developer that is about to dive into the Android market. The price of the development phone (Nexus 1 - $530) is quite high, so I thought to myself, "Why not spend $10 more and get something like the Dell Streak?". I haven't read any particular reviews on that device, but for an iPhone user that just wants a dependable device to develop on - what is the best fit? Ideally I am looking for a device that matches the experience that most Android users have - is that even possible?
If you can hold off just a little longer you could get a Samsung Nexus S which is the latest Android phone and will be shipping with Gingerbread (2.3).
I would suggest taking a look into statistics of device frequencies.
Android website provides http://developer.android.com/resources/dashboard/screens.html and OS versions.
But there are lot of other stats on the web, e.g.:
http://www.enterra-inc.com/techzone/android_statistics/
http://blog.tweetdeck.com/android-ecosystem
etc.
Any normal consumer-marketed android device can be used for application development - a developer phone is only needed if you want to modify the android platform and underlying linux itself (something that may also be possible by finding a way to root a consumer device)
To match the experience of most users, you probably want a recent device co-branded as a "google experience" device, ie one that comes with Android Market and the other google apps, which are not at present available for devices without that "blessing".
I would take a look at getting a motorola droid or droid 2 since they hold most of the android market share. I think this would provide the ideal user experience. I think the Samsung Nexus S will probably be THE android phone to have, but I dont think most people will have it for sometime.

Categories

Resources