前端之家收集整理的这篇文章主要介绍了前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在Play商店发布了我的应用程序,但它不适用于平板电脑.我在Google Play商店检查了该应用程序的功能,经过一些研究发现我的应用程序有一些电话功能,我相信这是一个有罪的一方.这是我的清单文件.
<uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="17" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
    <uses-permission android:name="android.permission.SEND_SMS" />

    <!-- GCM requires a Google account. -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />

    <!-- Keeps the processor from sleeping when a message is received. -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

    <permission
        android:name=".permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <uses-permission android:name=".permission.C2D_MESSAGE" />

    <!-- This app has permission to register and receive data message. -->
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <!-- Keeps the device on vibrating mode when a message is received. -->
    <uses-permission android:name="android.permission.VIBRATE" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.Black.NoTitleBar" >

        <receiver
            android:name="com.google.android.gcm.GCMBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="" />
            </intent-filter>
        </receiver>

        <service android:name=".GCMIntentService" />

        <activity
            android:name=".Splash"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".MainActivity"
            android:screenOrientation="portrait">
        </activity>

           <activity
            android:name=".SelectedArticlePush"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".ActusScreen"
            android:screenOrientation="portrait">
        </activity>

          <activity
            android:name=".MentionLegale"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".SelectedArticle"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="stateAlwaysHidden|adjustPan">>
        </activity>

        <activity
            android:name=".ReglementScreen"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".SelectedReglementation"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".FavoriteScreen"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".AlertScreen"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".ClubScreen"
            android:screenOrientation="portrait">
        </activity>

         <activity
            android:name="ClubMi"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".DisplayWeb"
            android:screenOrientation="portrait">
        </activity>

         <activity
            android:name=".Contact"
            android:screenOrientation="portrait">
        </activity>

         <activity
            android:name=".tab.TabClubMi"
            android:screenOrientation="portrait">
        </activity>

        <activity
            android:name=".SMS"
            android:screenOrientation="portrait"
            android:theme="@style/Theme.Transparent" >
        </activity>

    </application>

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

我相信< uses-permission android:name =“android.permission.SEND_SMS”/>激活电话功能.但是,我需要此权限才能发送短信.任何人都可以告诉我,如果在Tablet中运行,是否有另一种方法可以通过此方法.

解决方法

在您的Manifest中添加一个uses-feature块:
<uses-feature
    android:name="android.hardware.telephony"
    android:required="false" >
</uses-feature>

以上说明设备在您的应用程序中使用了此功能.但是,android:required =“false”确保这不是一个严格的要求,无论支持android.hardware.telephony功能的设备如何,都会安装应用程序.

然而,这会产生一个新问题.不用担心.随后是解决方案. 原文链接:https://www.f2er.com/android/317582.html

猜你在找的Android相关文章