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.
Related
I'm using Titanium SDK 2.1.3 and I've come across this problem recently, since Android 4.0 and greater can be found in both smartphones and tablets, how can I differentiate between them? If I try to distinguish based on resolutions it wouldn't work right, since some high end smartphones have smaller screens but higher screen resolutions, while some tablets have bigger screens but smaller resolutions.
The app I'm working on work should be displayed in portrait on smartphones, in the case of tablets it should be shown in landscape.
What's the right approach to differentiate between a tablet and a smartphone?
Thanks for any help in advance.
I found a module that calculates the screen size of the device based on the number of pixels per inch, though not 100% accurate it works, this is the link
In our Android we use different layouts for different screen resolutions, using the resource selection mechanism described at
http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
This works great, except for some devices which report the wrong screen size.
In particular we would want to use the same resolution on the Kindle Fire and the Nook Tablet. These have 600x1024 screens and thus should report themselves as having "large" screens. The Kindle Fire does so, but the Nook Tablets picks the "xlarge" resources:
http://nookdeveloper.zendesk.com/entries/20814001-emulator-loads-xlarge-layout
I can detect that the application is running on a Nook Tablet, and add a special case for it, but I have not found how I can force the resource selection mechanism to pick up resources for a certain screen size.
The simple solution (that you're probably not looking for) would be to not have an XLarge set of resources available for the Nook release. This causes both Nook devices to load the same resources. That's what I did, but since I didn't have a great set of XLarge changes this wasn't a big deal for me.
Sadly, Android didn't fix this issue until 3.2, which has minimum width selectors rather than the old bucket system. Nook is hanging tight at 2.3.4, though, so you'll need to roll your own if you want a better size selection system.
Personally, I haven't targeted 10" tablets as much as 7" tablets, because the top sellers are currently the Kindle Fire and Nook devices. The high profile of Nook may make it worth creating a separate build.
So basically I had to switch from 1.5 to 1.6 to add in Mobfox. As soon as I did this all the images being called by url are now being displayed much smaller. Is there a way to counter act this because it is kind of annoying and they were just the right size before.
I suspect you'll have to rework your images due to the different way that Android v1.6 onwards handles differing screen sizes and resolutions.
From Strategies for Android 1.5
All applications written for Android 1.5 or earlier, by default, support only the baseline HVGA screen used on the T-Mobile G1 and similar devices, which is normal screen size and medium density (mdpi). Android 1.6 introduced support for different screen configurations and added APIs that allow applications to control how they operate on different screens, using alternative resources for different screen configurations.
See this article for supporting different screens for v1.6 onwards...Supporting Multiple Screens
I'm an iOS developer and I'm looking into Android programming. On the iPhone I can count on pretty much one screen size on all devices, but that's not necessarily the case on Android.
How is that handled on Android? What if you need a widget to be at least some size?
Is it possible to specify a lower bound for Android devices that you can use your app? Can I say I'll only allow touch-screen devices with some minimum screen size and prevent people from purchasing the app if their devices don't meet the minimums I'm expecting?
Thanks!
Bill,
The android developers page has pretty good information on supporting the various screen sizes: http://developer.android.com/guide/practices/screens_support.html
And yes, you can limit your application to particular screen sizes via: http://developer.android.com/guide/topics/manifest/supports-screens-element.html
good luck!
You can restrict applications based on a range of enumerated screen sizes. The market will filter apps based on those.
http://developer.android.com/guide/topics/manifest/supports-screens-element.html
Some widget design guidelines are available here. Please be aware that many custom home applications do not honor the standard sizes.
http://developer.android.com/guide/practices/ui_guidelines/widget_design.html
You could specify minimum specifications for your app, but that's not necessary. The Android Developer Documentation states that applications don't work directly with resolution and pixels, but rather with density independent pixels that allow you to scale your applications across a range of screen sizes.
Android provides you with an API for getting the real pixel density of the screen as one of 4 categories (low dpi, medium dpi, high dpi, and extra-high dpi), so your application can choose to display the proper visual resources for a given pixel density. In addition, there are a number of best practices that you can use to ensure that your application scales nicely across screens.
I want to make sure that devices with 10,1" and 1024x600 under 2.1/2.2(e.g. Archos 101) are using the correct layout.
Are they large and ldpi?
Also, how can I simulate them using the android emulator?
In the end, the choices of screen size and screen density are up to the manufacturer. Hence, nobody here can answer you definitively.
A 10.1" diagonal screen should be large and probably should be ldpi, though it is possible it will be declared mdpi based upon the apparent density given the distance one would typically hold a 10.1" tablet from one's face.
Bear in mind that ARCHOS' devices do not ship with the Android Market AFAIK, and hence do not necessarily pass the various compatibility tests. As a result, ARCHOS could do all sorts of stuff that would be unexpected.
Also, how can I simulate them using the android emulator?
The Android SDK is not well-suited for testing a 10.1" LCD at this time. I would expect better instructions and support for such sizes in Android 3.0.
For now, set the resolution and density for the AVD when you create it. In this case, you would want to specify 120dpi (ldpi) for the density. Android should put it in the large screen size bucket for you, given those values. Leastways, that basic approach works for getting large WVGA devices.