本文介绍了谷歌播放不显示我的应用程序(经许可" CallPhone")针对平板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何显示我的应用程序(许可CallPhone)在谷歌播放的平板不具备选项CallPhone

how to show my application(with permission "CallPhone") in Google Play for Tablet does not have the option "CallPhone"

推荐答案

如果您使用的权限CALL_PHONE但你的应用并不仅仅依赖于使用它(一切工作得很好未做使用的电话功能),你必须也添加到您的清单。

If you use the permission CALL_PHONE but your application does not solely rely on using it (everything else works just fine without making use of the telephony features), you must also add this to your Manifest.

<uses-feature
    android:name="android.hardware.telephony"
    android:required="false" />

来源:

话虽这么说,你也将需要采取的功能服务。在每一个活动使用了 CALL_PHONE 许可,您还必须检查你的JAVA如果设备支持它。

That being said, you will also need to take care of the functionality. In every Activity that uses the CALL_PHONE permission, you must also check in your JAVA if the device supports it.

例如:

Context context;    // Some object, such as Activity, that extends Context
// ...
boolean hasTelephony = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);
if (hasTelephony) {
    // DEVICE SUPPORTS CALL_PHONE. DO YOUR BIT HERE
}
else {
    // DEVICE DOESN'T SUPPORT THE CALL_PHONE FEATURE. SHOW A TOAST OR A DIALOG OR SOMETHING HERE
}

这篇关于谷歌播放不显示我的应用程序(经许可&QUOT; CallPhone&QUOT;)针对平板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 03:19