1

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:

  1. OpenGL texture compression formats
  2. Screen size (and, optionally,screen density)
  3. 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?

neteinstein
  • 17,529
  • 11
  • 93
  • 123

2 Answers2

2

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.

pandre
  • 6,685
  • 7
  • 42
  • 50
-1

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.

kikoso
  • 673
  • 1
  • 6
  • 17
  • The problem isn't to show or not to show. It's if it has the permission on the manifest, it will show as incompatible when trying to download to tablets only with WiFi. – neteinstein Nov 29 '11 at 15:29
  • @kikoso, since applications must specify permissions in the manifest, applications can't "avoid to link with the calls module" – pandre Nov 29 '11 at 15:42