Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

App ins't compatible with lots of smartphones / tablets

So, i created an app that works ok in about 4000 models of smartphones / tablets, but it ins't compatible with about 3000. (Data from google play). I understand that some aren't compatible because of the API, but in my nexus 5, with Android 4.4.2 the app works, but on a Samsung Tab S 8.4 with 4.4.2, is doesn't. Whats the problem?

I don't understand.

2 Answers

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

My guess is that the excluded devices are based on these two permissions:

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

Having CALL_PHONE by default makes the phone aspect of a device required, which is problematic for tablets. You can make it an optional feature, though, but adding a uses-feature set to false, like explained in this StackOverflow answer: http://stackoverflow.com/a/7883767/475217

Working. Thanks Ben!

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Can you paste in the contents of one of these?

  1. If using Android Studio: build.gradle (in the app module)
  2. If using Eclipse: AndroidManifest.xml

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.web2dev.digitalmkt"
    android:versionCode="2"
    android:versionName="1.0.1" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="19" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.CALL_PHONE" />

    <application
        android:name="com.web2dev.digitalmkt.digitalmktApplication"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/LiveoActionBarTheme" >

        <!-- SplashScreen -->
        <activity
            android:name="com.web2dev.digitalmkt.SplashScreenActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Light.NoTitleBar" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <!-- Main -->
        <activity
            android:name="com.web2dev.digitalmkt.NavigationMain"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.NavigationWithoutLogin"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:label="@string/app_name" >
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.BlogWebViewActivity"
            android:icon="@drawable/ic_launcher_white"
            android:label="@string/title_activity_blog_web_view" >
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.YouTubeActivity"
            android:configChanges="orientation|keyboardHidden|screenSize"
            android:icon="@drawable/ic_launcher_white"
            android:label="@string/title_activity_you_tube" >
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.SobreAppActivity"
            android:icon="@drawable/ic_launcher_white"
            android:label="@string/title_activity_sobre_app"
            android:parentActivityName="com.web2dev.digitalmkt.NavigationMain" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.web2dev.mktdigital360.NavigationMain" />
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.LoginActivity"
            android:label="@string/title_activity_login"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name="com.web2dev.digitalmkt.SignUpActivity"
            android:label="@string/title_activity_sign_up"
            android:screenOrientation="portrait" android:parentActivityName="com.web2dev.digitalmkt.LoginActivity">
        </activity>
    </application>

</manifest>