android app development multiple screen size [duplicate] - android

This question already has answers here:
Android Multiple Device Development
(5 answers)
Closed 8 years ago.
We are developing an android application. Actually we are iPhone developers. One challenge we faced during the android development than iOS development is, the wide variety of devices the android application going to be used. From the link http://developer.android.com/guide/practices/screens_support.html we got some useful information.
1)
But we think that the testing effort we need to more than that of iOS in android based on the screen sizes. Can somebody suggest us to the method the do various sized device testing for android devices.
2)
Or at least we can inform our customer that we will test in such devices only. But our point is how can we say that, like device names like Samsung S2, Samsung Galaxy Note or Devices like 640X480 size, 320X240 size etc? Please advise us.
3)
Do we have any size specification for images for small, normal, large, xlarge and ldpi, mdpi, hdpi, xhdpi ?

Developing for multiscreen, First make sure that the AndroidManifest.xml specifies the correct target SDK. For android 2.2, the target SDK level is 8. For processing it requires at least SDK level 7 to run.
<user-sdk android:minSdkversion="7" android:targetSdkversion="8"></user-sdk>
Use this <user-sdk> element, so that the platform will consider that your android app is for 2.2, otherwise, it takes it as for Android 1.5.
The Display metrics values for "normal-hdpi" screen is
DisplayMetrics{density=1.5, width=854, height=480, scaledDensity=1.5, xdpi=240.0, ydpi=240.0}
For size classification use this configuration class
Configuration config = getResources().getConfiguration();
int size = config.screenLayout & config.SCREENLAYOUT_SIZE_MASK;
if (size == config.SCREENLAYOUT_SIZE_SMALL)
{
// use special layout for small screens
}
Hopefully this solution will be useful to you.

Related

Is there a list of largest and smallest real Android device screens in existence per Android version?

I have an app that targets Android 4.1+. My designer is working on a screen that has a lot of information and we are trying to make sure it will fit on the smallest possible screen size given my minimum Android version. Is there such a list for actual real existing devices?
Thank you.
Android as an operating system does not define a screen size minimum. However, if you really want a number to reference your best bet may be to consult the compatibility definition document. Google requires that vendors adhere to these requirements if they wish to include Google's proprietary apps in their devices (such as the play store). Almost all commercially available mainstream android phones fit into this category.
You can view the CDDs all listed here:
https://source.android.com/compatibility/cdd
And you can see here for android 4.1 screen sizes
https://source.android.com/compatibility/4.1/android-4.1-cdd - scroll to section 7.1.1
which states "Devices MUST have screen sizes of at least 426 dp x 320 dp ('small')" along with a few more rules
There is no master list as per API and screen size but here are few alternatives, I Don't know if you have gone through these links or not but here are few of them you might find helpful.
Device Metrics
PDF list of supported devices by play store
Wiki link for android devices
List of Jelly Bean devices

what kind of mobile will be updated to Android 4.0.3 or 4.1 version?

I made an application under Android emulator provided worked perfectly on all types of dispositives (small, normal, large, xlarge) (-ldpi,-mdpi, -hdpi,-xhdpi). But the last few days I saw that in some phones with the latest versions of android (these phones consist with a lower bar like tablets) did not look properly.
So my question is: what kind of phones have or can upgrade to these versions of android? (small-HDPI, normal-HDPI, normal-xhdpi???)
Thank you!
Theoretically, nothing stops a manufacturer from making an ldpi device capable of running ICS or JB. However, in practice, most devices with ldpi and even mdpi to some extent do not have good enough processors in both CPU and GPU departments to be able to run the newer version of Android.
Till date, the lowest I've seen an ICS device go screenwise is a normal-mdpi display. However, I do not know the details of every device in existence, and there could be lower devices as well.
You should design your app keeping in mind all device configs, at most excluding only ldpi and small displays.

Which Android devices should I test against? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What hardware devices do you test your Android apps on?
I'm porting my iPhone app over to Android, planning on releasing it in the Google and Amazon AppStores. I'm planning on targeting OS versions 2.2 and 2.3, as they have the highest market share.
But, what devices have the highest market share? I want to make sure I test on the "common" devices, and so I'm looking for resources / recommendations about which devices to include in my testing regimen.
It depends the target country as the market share of a device varies.
I would recommend covering some of the following attributes
Devices with screens : ldpi, mdpi and hdpi
Devices with screen sizes : small screen (3 inches), normal screen ( 4 inches ) large screen ; 7 inches or more
Refer to the platform versions link for more details
http://developer.android.com/resources/dashboard/platform-versions.html
There are no dominating phone models in the android world. My app supports 2.2+ (API 8). The top three phones models among its users are Galaxy S2 7%, EVO 7% and Galaxy S 2.7% with a long tail of 'other models'. Welcome to the free world. ;-)
From compatability view point, it is safer, if you can live with it, not to use targetSdkVersion and to have minSdkVersion == target SDK version (as you set in eclipse).
Also, make sure to test in portrait and landscape (unless if your app is limited to a single app) including transitions mid activity.
AFAIK, As long as your app working on target OS, device shouldn't be an issue. Anyway, you may try on samsung galaxy, HTC etc., By the way you may need to make sure it is working for different resolutions.

Minimum android tablet size information needed

I want to develop application with single binary for Android device and for Android tablets with target android 2.1 version.
My orientation also depends upon whether app is running on device or on tablet.
So i just want to know, is there any specification like tablet should be minimum of "X" inches.
There is heaps of information on screen sizes and each device can be different so you should use the Android standards talked about here to figure out exactly what screen you are dealing with and react accordingly. There are no hard and fast "atleast X inches" rules; just different screen sizes of different resolutions. You can use the Android manifest to restrict the screen sizes to just the ones that you want to support.
My orientation also depends upon whether app is running on device or on tablet.
Your application should depend on whether the screen is small, normal, large, or xlarge. There is no concept of "device or on tablet" in Android.
is there any specification like tablet should be minimum of "X" inches.
There is no concept of "tablet" in Android. What a user will think of as a "tablet" will tend to be large or xlarge screen size.

android supported devices

i developed one application that should run on all the android supported devices.can you please suggest me different screen resolution of android os devices
QVGA-L
QVGS-P
HVGA-P
HVGA-L
were the original standard resolutions.
WQVGA (DSTL1 etc)
WVGA (Droid Incredible)
1366 * 768 WXGA (ODROID T)
are all the ones since developed that I'm aware of at the moment. generally android applications should run in portraid & landscape (and sometimes square) orientations.
There doesn't seem to be a central place where all this information is posted, but if you use QVGA/HVGA and scalar settings for larger resolutions this may get help for future devices.

Categories

Resources