8

我有以下清单:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.myapp.MainActivity"
    android:versionCode="1"
    android:versionName="1.0.0" >

    <supports-screens
        android:anyDensity="false"
        android:largeScreens="true"
        android:normalScreens="true"
        android:resizeable="false"
        android:smallScreens="true"
        android:xlargeScreens="true" >

    </supports-screens>

    <uses-permission
        android:name="android.permission.RECEIVE_SMS"
        android:required="false" >
    </uses-permission>
    <uses-permission
        android:name="android.permission.SEND_SMS"
        android:required="false" >
    </uses-permission>
    <uses-permission
        android:name="android.permission.ACCESS_COARSE_LOCATION"
        android:required="false" >
    </uses-permission>
    <uses-permission
        android:name="android.permission.ACCESS_FINE_LOCATION"
        android:required="false" >
    </uses-permission>
    <uses-permission android:name="android.permission.INTERNET" >
    </uses-permission>
    <uses-permission
        android:name="android.permission.CALL_PHONE"
        android:required="false" >
    </uses-permission>

    <uses-sdk android:minSdkVersion="7" ></uses-sdk>

    <receiver
        android:enabled="true"
        android:name="com.myapp.receiver" >
        <intent-filter android:priority="10" >
            <action android:name="android.intent.action.DATA_SMS_RECEIVED" />

            <data
                android:host="localhost"
                android:port="12345"
                android:scheme="sms" />
        </intent-filter>
    </receiver>

如果我将其上传到 Android Market,则该应用程序对于 Galaxy Tab 10.1 等平板电脑不可见。

我认为屏幕设置没问题,因为我有第二个具有相同设置的应用程序并且这个应用程序是可见的。所以我认为这是因为权限..

有人可以帮助我吗?

4

3 回答 3

19

What about adding this to your manifest:

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

(To be added right under your manifest tag)

于 2011-12-07T18:14:05.150 回答
6

The Market seems to infer that telephony support is required whenever certain permissions are added to the AndroidManifest.xml, e.g. by default, READ_SMS or CALL_PHONE both seem to cause the Market to only offer the app to telephony enabled devices.

The best way to check if this is happening is to log onto your Android Market publishing account, and look for the "Required device features" section:

required device features

Now look at the "Show devices" link above. This is really useful for checking exactly which device models your app can be downloaded on.

Click "Show devices", and then search for the devices that you are interested in. The "Xoom" is a good one to check as at the moment it is wifi only, and doesn't currently include any telephony support:

xoom supported devices

Other devices can be more tricky. The Samsung Tabs have a range of devices, some with telephony capabilities (you need to click on the "Samsung" link under the "Manufacturer search results" to see these lists):

samsung supported devices

...and some without telephony (which in this case makes them unsupported for my app):

samsung unsupported devices

The fix is to set telephony to be optional in the AndroidManifest.xml for your application:

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

Even when Android thinks a device doesn't support telephony (e.g. a wifi-only Samsung Tab), it might support telephony in a non-native way (e.g. Skype). For more information, see my answer here:
Android Device phone call ability

于 2011-12-13T19:28:47.557 回答
0

尝试添加这个:

 <supports-screens
          android:largeScreens="true"
          android:normalScreens="true"
          android:smallScreens="true"
          />
于 2011-12-07T18:07:58.310 回答