是否有安装的应用程序,对平板电脑send_sms权限的方法 [英] Is there a way to install app that has send_sms permission on tablet

查看:146
本文介绍了是否有安装的应用程序,对平板电脑send_sms权限的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有我的应用程序,它有一个功能来发送短信的问题。然而,它可以工作得很好,没有这种功能。我得到的信息,人们不能在平板电脑上安装它。所以,我能做些什么,禁止在平板电脑上的功能,但保持它在手机上。

So I'm having a problem with my app which has a functionality to send SMS. However it can work just fine without that functionality. I got info that people cant install it on tablets. So what can I do, to disable that functionality on tablets but keep it on phones.

这是我的清单:

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

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<uses-permission android:name="android.permission.SEND_SMS">
</uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS">
</uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:icon="@drawable/ikona"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/title_activity_main"
        android:screenOrientation="portrait">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

有没有办法?

推荐答案

如果您的应用程序工作没有短信功能,您可能需要添加使用特征 AndroidMainfest.xml 文件,以便应用程序也将显示在谷歌播放设备不具备电话(SMS)的硬件功能。

If your app works without SMS functionality, you might need to add the uses-feature to the AndroidMainfest.xml file so the app will also show for devices in Google Play that doesn't have phone (sms) hardware capabilities.

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

&LT;使用特征&GT;

语法:

     &LT;使用特征的android:名称=字符串安卓所需=真| 假]机器人:glEsVersion =整数/&GT;

包含于:

&LT;&舱单GT;

说明

声明所使用的应用程序的单个硬件或软件功能。

CONTAINED IN:
<manifest>
DESCRIPTION:
Declares a single hardware or software feature that is used by the application.

1所述的目的;采用特征&GT; 声明是向组上应用程序依赖的硬件和软件功能的任何外部实体。该元素提供了必需的属性,让您指定应用程序是否需要和不申报的功能不能发挥作用,还是prefers有功能,但没有它可以发挥作用。由于功能的支持可以在Android设备各不相同,&LT;使用特征方式&gt; 元素餐厅在让应用程序描述它使用的设备变量功能具有重要作用

The purpose of a <uses-feature> declaration is to inform any external entity of the set of hardware and software features on which your application depends. The element offers a required attribute that lets you specify whether your application requires and cannot function without the declared feature, or whether it prefers to have the feature but can function without it. Because feature support can vary across Android devices, the <uses-feature> element serves an important role in letting an application describe the device-variable features that it uses.

一般情况下,你应该始终确保申报&LT;使用特征&gt;对所有的应用程序需要的功能元素

&LT;使用特征&GT; 元素仅供参考,这意味着Android系统本身不检查安装应用程序前在设备上的匹配功能的支持。然而,其他服务(如谷歌播放)或应用程序可能会检查你的应用程序的&LT;使用特征&GT; 声明作为处理的一部分或与之交互你的申请。

Declared <uses-feature> elements are informational only, meaning that the Android system itself does not check for matching feature support on the device before installing an application. However, other services (such as Google Play) or applications may check your application's <uses-feature> declarations as part of handling or interacting with your application.

参考:

<一href=\"http://developer.android.com/guide/topics/manifest/uses-feature-element.html\">http://developer.android.com/guide/topics/manifest/uses-feature-element.html

这篇关于是否有安装的应用程序,对平板电脑send_sms权限的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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