多个 APK - 拨打电话

发布于 2024-12-19 00:04:27 字数 425 浏览 1 评论 0原文

如果我有一个需要拨打电话的应用程序,并且想要制作另一个不使用它的版本(使其只能在平板电脑 wifi 上工作 - 当然也允许用户从市场安装它)我该怎么做?

Android 市场的多 APK 支持对我没有帮助,因为它仅允许多个 APK 具有以下任何不同

  1. OpenGL 纹理压缩格式
  2. 屏幕尺寸(以及可选的屏幕密度)
  3. API 级别

将我需要有 2 个不同的应用程序?! (那是拉米)。

我可以通过编译 2 个不同的 API(2.0:没有手机权限的应用程序和 2.1 有手机权限的应用程序)来解决问题/市场,但将两者的 minVersion 设置为 1.6,以便它们都可以工作在相同的设备上?

即使它接受这一点..市场会向设备显示正确的版本吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不即不离 2024-12-26 00:04:27

如果您想要支持通话,但又不想排除不支持通话的设备,则不需要有两个 APK。

只需将此行添加到您的清单中:

这将表明应用程序将使用电话如果有的话。

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.

温折酒 2024-12-26 00:04:27

这个问题非常通用,因为您没有公开应用程序的哪些部分需要进行调用。

建议您通过执行以下操作来避免与呼叫模块链接:

 PackageManager pm = root.getContext().getPackageManager();
 boolean telefon = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

如果 telefon 等于 false,则应用程序不支持电话呼叫,因此不应显示呼叫模块。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文