多个 APK - 拨打电话
如果我有一个需要拨打电话的应用程序,并且想要制作另一个不使用它的版本(使其只能在平板电脑 wifi 上工作 - 当然也允许用户从市场安装它)我该怎么做?
Android 市场的多 APK 支持对我没有帮助,因为它仅允许多个 APK 具有以下任何不同:
- OpenGL 纹理压缩格式
- 屏幕尺寸(以及可选的屏幕密度)
- 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:
- 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想要支持通话,但又不想排除不支持通话的设备,则不需要有两个 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.
这个问题非常通用,因为您没有公开应用程序的哪些部分需要进行调用。
建议您通过执行以下操作来避免与呼叫模块链接:
如果 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:
If telefon is equal to false, the application do not support telephone calls and therefore you shouldn't show the calling module.