我的应用程序在仅WiFi设备上不兼容 [英] My App is not compatible on WiFi only devices

查看:96
本文介绍了我的应用程序在仅WiFi设备上不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个Android应用,可在来电中显示呼叫者的电信位置.

I developed an android app which shows the caller's Telecom Location on Incoming Call.

我已将其上传到Google Play上,但该应用程序未出现在仅Wi​​Fi设备上,它表明您的设备不兼容.

I uploaded it on Google Play, but this app does not appear on WiFi only devices, it says your device is not compatible .

我的清单权限详细信息如下.

My Manifest permission details are below.

     <uses-permission android:name="android.permission.READ_CALL_LOG"/>
   <uses-permission android:name="android.permission.READ_CONTACTS"/>
   <uses-permission android:name="android.permission.WRITE_CONTACTS"/>

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>


     <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

我对以下权限表示怀疑

     <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

哪个特定权限造成了问题?解决办法是什么.

Which particular permissions are creating problem? What is the solution.

谢谢

推荐答案

google play商店会根据其所需的权限和android设备中可用的功能来过滤应用程序.因此,您的应用程序将不会显示在仅WiFi设备上,因为该应用程序需要 CALL_PHONE 权限和 MODIFY_STATE_PERMISSION .

The google play store filters applications based on the permissions they require and the features available in the android device. So, your app will not show up in WiFi only devices because the app requires the CALL_PHONE permisssion and the MODIFY_STATE_PERMISSION.

MODIFY_PHONE_STATE 权限不允许您拨打电话,但这意味着需要电话.

The MODIFY_PHONE_STATE permission does not allow you to place calls but it implies that telephony is a requirement.

来源: https://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions

因此,您应该使用< uses-feature> 元素而不是上述权限.

Hence, you should use the <uses-feature> element instead of the above mentioned permissions.

来自Docs:您可以通过在元素中使用android:required ="false"属性显式声明隐含功能,来禁用基于隐含功能的过滤.

From Docs : You can disable filtering based on the implied feature by explicitly declaring the implied feature, in a element, with an android:required="false" attribute.

您的情况:

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

但是,在实际检查电话相关功能是否可用之前,还需要确保不使用任何与电话相关的功能.

But then you also need to ensure that you do not use any of the telephony related features before actually checking if it's available of not.

在android应用中,对于SDK> = 5,您应使用:

In the android app, for SDK >=5 , you should use :

PackageManager pm = this.getPackageManager();
boolean hasTelephony = pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY);

这篇关于我的应用程序在仅WiFi设备上不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆