Possible to limit Android app by device, not by OS version? - android

If I want a certain application to be available for certain devices only or for tablets only, is there any way to make limitations by device (like I can limit the min/max Android OS version)?
I say it is impossible. Do you agree?

I understand that you are trying to limit the devices that can see the application in the Market but, like you, I do not think that is possible. You can, however, limit it within the app using details from and Build class. Build.PRODUCT looks like it would fit your needs - if the phone that has the app installed in not in a pre-set list of "products", tell the user that they have the wrong version and exit.
A similar idea for tablets is to check the screen size - if they are under a certain threshold, then display that same message.

It is possible, starting in june this year. Please take a look at this Google I/O session:
http://youtu.be/GxU8N21wfrM

Related

Updating an old pre-tablet Android app to a tablet version

So here's the scenario: we have an old app on the Play Store that was published before there were any tablets (it runs on tablets using the phone interface.) We want to release an update to that app (because it has >150K users) instead of a new app but because the design for the phone UI won't be ready in time for our deadline we want to release an update that targets only tablets for now while the existing users continue to use the old phone-only app. Later, when the design and implementation of the phone UI is complete, we want to release another update that adds support for phones.
Ideally what should happen is if a user is using the old app on a phone, they will not get the first upgrade notification but a user running it on a tablet will get the update notification (and a new user installing it for the first time will get the the old apk if, for example, they're running a Gingerbread phone while a user using, say, a Nexus 7 will get the new apk.) Eventually, all users will get the update notification to the second release no matter what Android version/device type they are running.
If we do this, what will the experience be for the current users that are using the old version on phones? Will they be prompted to upgrade to an app version they cannot run or will they get no update notification at all? Later, when we release the second upgrade that does support phones will they then get the update notification?
To make your app look great on tablets, just add specialized layout types, just like
layout-large or layout-sw600dp. Then copy your existing layout-xml files from your layout folder to these and modify them as required.
I suggest reading Supporting Different Screen Sizes.
This way, you add tablet-optimization without throwing away phone compatibility.
I'm not quite sure what you mean by having an update only available to a certain device. Tablets and phones work quite differently and the Google Play market is capable of differentiating what will run on the user's current device and what won't.
Like the previous answer you WILL be required to construct different layouts specifically for tablets.
However if you only want an update to tablets to take place on tablets - You need to get as much information about the screen size, density, device version and maybe even the current users android OS version to really help you narrow down whether the current device is a tablet or large screen device or not.
For example:
Get screen dimensions in pixels
shows you how to get screen dimensions.
How can I check the system version of Android? Gives you more information about the current android version.
getting the screen density programmatically in android?
will allow you to find out the screen density of the current screen.
Using all of the above, or some similar combination, you can determine if the user is running your app on the tablet, if they are, provide them with an update, if not, the app continues with its regular layouts as normal.
I'm not quite sure if this is the answer you were looking for, but I hope it helps.
Take care

How to make sure that your application will be compatible with range of devices?

In Google play (app market), if an application is not compatible to your device (for some reason, say small screen size, etc). Then it is not even shown in the list.
Now, as an app developer I never want to unintentionally add a limitation in my app that forbids it from a range of devices.
So, while developing how can I make sure that the application will be able to run on atleast the type of devices that I intend.
Also, right now I'm developing an app & testing it in on my phone with version 2.3.5. And every now & then Google changes some method names & flags.
For newer android releases, I CAN test it on emulator, but testing it on phone/tabs/etc. is a different thing.
Please suggest.
how can I make sure that the application will be able to run on atleast the type of devices that I intend.
In manifest file you can mention, which type of device you want to run your app. And for testing you can create emulators for different devices to test your app. Try to make app UI such that it runs on all devices.
Google changes some method names & flags
Whenever Android changes any thing it will always be upward compatible means if you have made app for 2.2 it will run on 2.2 and above (screen size or resolution is other thing)
Regarding UI see my answer here
Layout for 720*1280 devices
By default apps will be available to as wide a range of users as possible.
There are certain limitations you can define in your manifest file, such as not being available on small screen sizes, but they are at your discretion.
The only limitation Google imposes on you is that any user who has a lower Android version than your minimum SDK version cannot see your app. To get around this, you can either design the app for lower SDK versions (I believe building for 2.2 and up gives you access to about 95% of the user base) or maintain multiple versions of the APK.
Read this. It will really help. Next Eclipse will help you a lot, firstly you can define what you wish to support (screen sizes and hardware requirements or even if they're not necessary but may be used) in the manifest. You can run a version check and implement APIs dependent on which version of Android you're running on. That's personally what I do, I check the API level and if it's greater than or equal to the API I wish to run I run it, otherwise I attempt to find compatible code (often using the compatibility library) or alternatively drop support for that feature, for example JellyBean notifications there's not really any work around for expanded notifications but I can use the NotifcationCompat builder.

Android Phone & Tablet compatibility

Simple question,
I make an application for my phone (android froyo).
Is it will run on android froyo tablet ?
Or I must make some modification to make it work on tablet ?
Simple answer: It may run on the tablet - try.
Not so simple answer: It depends on whether you use some features of the phone and whether those features are available in your tablet. For example, if your tablet does not have GPS and you are developing location aware applications, that obviously is not going to work. Another thing to take care of would be the usability of the application. Your UI would most probably be designed with the phone's form factor in mind. That may not look exactly appealing on a large screen device like the tablet.
So long as you use the appropriate <supports-screen> tags in your Manifest.xml file, yes. However, I'd strongly suggest you go about making a tablet UI, because users don't like phone UIs stretched on a tablet screen. This document might help you with that.

My Apps don't appear on the top free list on the android market

Hey i have few apps in the top places on some list (music\games) on the android market but when i look with galaxy tab 10 i they don't appear.
does anyone know what is the reason? should i need to add somthing in my manifest?
tnx
Yes, the Android Market indeed employs a filtering mechanism that (among other things like SIM card country) inspects your application Manifest and decides whether or not to make your application available to certain devices. You could, for instance, decide to make your application only available to devices that specify a certain screen size.
Have a look at the Android Compatibility docs, particularly the Market Filters bit.

How to determine if an Android device has a touchscreen?

I'm spending considerable time in making my UI to work with keyboard input only. But in the end I'm not sure whether I can rely on the assumption that Android devices all have touch screens.
Is there a way to determine if an Android device has a touch screen?
You should research the existing devices and read the Android Compatibility Definition Document (CDD) and decide for yourself.
I have spent some considerable time trying to figure out this problem for myself. The posters above are correct that Android already powers some non-touch devices and will power Google TV in the near future, but as it currently stands, the CDD specifically requires that ALL Android devices MUST have a touchscreen.
Basically, the Android Compatibility program was created to hedge against the sort of fragmentation issues you're worrying about now. It lists a bunch of requirements, and if a device does not meet those requirements, it does not get access to Android Market. These requirements include a touchscreen, wireless communication, bluetooth, a camera, and much more.
If you research those tablets and netbooks, you will find that not a single one carries the Android Market. Augen recently tried to pull a fast one with their new GENTOUCH 78 tablet, but had to rescind their claims that the tablet would carry Android Market after being shot down by the Android Compatibility Team.
So, if you are only distributing your app through Android Market, you have nothing to worry about until Google changes the CDD. But if you'd like to offer your app on other app stores or as a direct download, then you'll have to worry about your key mode navigation issues.
If it's any consolation, I have found that many, many apps have the exact same problem; they are impossible to use without a touchscreen. Many of them also have serious issues with focus and the soft keyboard. Sometimes the keyboard stays up when it should be hidden. Sometimes you can't get the keyboard to pop up no matter how many times you click on an EditText. IMO, the Android framework does not handle these things all that well.
Given all that, it will certainly be interesting to see how Google TV fits into all this. Will they update the CDD to be compatible with their set-top boxes? Will they use a different SDK and CDD for Google TV implementations? Will they ignore the Compatibility Program altogether when it comes to Google TV? Your guess is as good as mine.
Update:
It seems that someone at Google has finally come forward and admitted that Android is not ready to run on a tablet:
http://phandroid.com/2010/09/10/shocker-google-says-android-not-meant-for-tablets-in-its-current-state/
To me, this says that Google was not prepared for the accelerated adoption of the Android OS and has not adequately roadmapped the future of the platform. Supporting screens larger than 480x800 is barely possible, and Samsung was only able to do it by working closely with Google on the Galaxy Tab. So I'm not so sure we need to worry about non-touchscreen devices in the near future. They'll be here eventually, I'm sure, but when they do arrive we may see a separate app market just for those, or some altered filtering scheme on the existing market, a new CDD, who knows.
To me, this says that Google is still playing it by ear, and we'll just have to do the same.
All the phones so far have touch screens, but there is no promise that they must.
However there are lots of netbooks, notebooks, and soon to be TVs that have no touch screen.
However these devices have mice. From what I've seen, the mouse input gets pumped through the touch system so MouseDown is ACTION_DOWN, etc... (Don't know about right click though)
Are you targetting just the phones? Android is appearing on many devices including TV's I've no idea if new libs will be released to isolate parts of the devices from each other, but if you want a broader audience I'd suggest keeping the keyboard input available if you are
Google TV (GTV) is the most popular Android notouch device (as of the time this answer is composed). However, there are several devices that will call for notouch renderings if you have "notouch" resources (e.g. a directory like res/layout-notouch/ )
To accommodate notouch devices, made sure that focus will cause a visual selection indicator, and (for GTV) that keystroke listeners are in place for the directional-pad center button. Using default widgets and themes will often accomplish much of this automatically. If you make your own buttons, you need background 9-patches for focused and focused+pressed.
Running on a GTV is a good test environment to make sure that notouch works well, and GTV has an emulator now, though it runs only on Linux/x86.

Categories

Resources