1

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.

That's my Manifest:

<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>

Is there a way?

gabrjan
  • 3,080
  • 9
  • 40
  • 69
  • I don't think that a tablet user can't install your application. USER can install. Where did you read? – Pankaj Kumar May 06 '13 at 11:55
  • I got report from 2-3 users of MEDION Lifetab P9514 that theirs device, doesn't recognize my app, so i thought there is a problem with all tablets. I didn't realy think about it before. – gabrjan May 06 '13 at 11:58
  • No. It would be because of some other filters... – Pankaj Kumar May 06 '13 at 12:00
  • I just posted my whole manifest file, do u see anything that could couse that and btw. is there any source where can i read about app with sens_sms priviliegs to work on tablets? – gabrjan May 06 '13 at 12:03
  • check with uses-feature as both answers suggested... – Pankaj Kumar May 06 '13 at 12:11

1 Answers1

5

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" />

<uses-feature>

SYNTAX:
<uses-feature android:name="string" android:required=["true" | "false"] android:glEsVersion="integer" />

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

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.

In general, you should always make sure to declare <uses-feature> elements for all of the features that your application requires.

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.

Reference:
http://developer.android.com/guide/topics/manifest/uses-feature-element.html

kaderud
  • 5,457
  • 2
  • 36
  • 49
  • So if i add uses-feature do i have to remove uses-permission – gabrjan May 06 '13 at 12:10
  • No, they should stay, you should add the `uses-feature` in addition to any `uses-permission` that implies a specific feature requirement, see the bottom of the document in the link above. – kaderud May 06 '13 at 12:14