Multiple APK - Make calls - android

If i have an application that needs to make calls and want to make another version that doesnt use it (to enable it to work on tablets wifi only - and also to enable uses to install it from the market of course) how can i do it?
Multiple APK Support of the Android Market will not help me as it only allows multiple APKS if they have any of the following different:
OpenGL texture compression formats
Screen size (and, optionally,screen density)
API level
Will I need to have 2 differente applications?! (That's lameee).
Can i foul the problem/market by compiling versus 2 different APIs (2.0: to the app without phone permissions and 2.1 to the app with phone permissions) but setting the minVersion of both to 1.6 so they both work on the same devices?
Even if it accepts this.. will the market show the correct version to the devices?

If you want to have support for calls but you don't want devices without call to be excluded you don't need to have two APK's.
Just add this line to your manifest:
<uses-feature android:name="android.hardware.telephony" android:required="false" />
This will state that the application will use telephony if it is available.

The question is very generic, since you don't expose which parts of your application need to do calls.
As a suggestion, you could avoid to link with the calls module by doing the following:
PackageManager pm = root.getContext().getPackageManager();
boolean telefon = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
If telefon is equal to false, the application do not support telephone calls and therefore you shouldn't show the calling module.

Related

How to distinguish if Android app runs on Smartphone/Tablet or Android-TV-Stick?

I applied following to distinguish between normal Android OS and Android TV:
if (pm.hasSystemFeature("com.google.android.tv")) {
// here it is a Android TV
} else {
// here it is a smartphone or tablet or Car
}
It does not work for Android based TV sticks. I think it works for GoogleTv only?
How can I check for any Android based TV?
We match by android.software.leanback OR com.google.android.tv.installed. Where the former is the "official" way to check for it but of course manufacturers always do their own thing.
The latter was chosen by checking out quite a few different devices and we haven't had any complaints about not supporting TV hardware after that.
To publish to the PlayStore with <uses-feature ...> in the manifest, we resorted to publishing two variants, each with one of the features as a requirement...

How to define target devices for an app in Google Developer Console

I would like to distribute my app for only tablets.
I know I could define supported screens in the Manifest.xml, but if possible I would like to enable/disable screensizes in the developer console. This is much more flexible for me.
I also know that I could enable/disable specific devices for an app, but this is too time costly.
Is this possible in any way ?
Is this possible in any way ?
No. Your app will be made accessible to devices based on your AndroidManifest.xml requirements e.g., screen sizes, camera required etc etc.
Your only options are enabling/disabling devices as you mentioned or to periodically upload a new version of your APK with an updated AndroidManifest.xml file.

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.

How to filter my tablet version app in google play whcih used uses-feature telephony in android?

I developed and android application and uploaded in google play for mobiles. Now i did the tablet version with same functionality. In my tablet version i used <uses-feature android:name="android.hardware.telephony"> attribute which is used for phone calling services. I developed my application for both calling supported and unsupported tablets.Here i want to show my tablet version for only tablets even those are enabled/disabled with calling functionality.
I know one thing like below which will filter application play store and show the application only for android mobiles.
<uses-feature android:name="android.hardware.telephony" android:required="true"/>
Is there any other way which will filter my application and make available for only tablets( calling function enabled/disabled)
Please advice me.
Thanks in advance.
you can put on your manifest the support screen size xlarge and then the phone version you put support screen size small, medium, large.
Also you can check on the google play publish site the multiple APKs thing. I never used by I reckon it's used exactly for 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.

Categories

Resources