Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
437 views
in Technique[技术] by (71.8m points)

cordova - How to make android Phonegap available for tablets?

I just created an Android application using Phonegap and deployed it to the store. It simply shows the content of a website. The problem I'm having is this application is visible to Mobile devices only, not tablets, even after including this in the manifest file:

<compatible-screens>
  <!-- all small size screens -->
  <screen android:screenSize="small" android:screenDensity="ldpi" />
  <screen android:screenSize="small" android:screenDensity="mdpi" />
  <screen android:screenSize="small" android:screenDensity="hdpi" />
  <screen android:screenSize="small" android:screenDensity="xhdpi" />
  <!-- all normal size screens -->
  <screen android:screenSize="normal" android:screenDensity="ldpi" />
  <screen android:screenSize="normal" android:screenDensity="mdpi" />
  <screen android:screenSize="normal" android:screenDensity="hdpi" />
  <screen android:screenSize="normal" android:screenDensity="xhdpi" />
  <screen android:screenSize="large" android:screenDensity="ldpi" />
  <screen android:screenSize="large" android:screenDensity="mdpi" />
  <screen android:screenSize="large" android:screenDensity="hdpi" />
  <screen android:screenSize="large" android:screenDensity="xhdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="ldpi" />
  <screen android:screenSize="xlarge" android:screenDensity="mdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="hdpi" />
  <screen android:screenSize="xlarge" android:screenDensity="xhdpi" />
</compatible-screens>

I don't know what to do. The tablet I'm testing on is an Acer A100 7", running Android version 4.0.3.

UPDATES

Here is the manifest file:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.rakoty.rakoty"
  android:versionCode="1"
  android:versionName="1.0">
  <uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />
  <supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:resizeable="true"
    android:anyDensity="true" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.VIBRATE" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.RECEIVE_SMS" />
  <uses-permission android:name="android.permission.RECORD_AUDIO" />
  <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
  <uses-permission android:name="android.permission.READ_CONTACTS" />
  <uses-permission android:name="android.permission.WRITE_CONTACTS" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.GET_ACCOUNTS" />
  <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  <uses-permission android:name="android.permission.BROADCAST_STICKY" />
  <compatible-screens>
    <!-- the screen part from above -->
  </compatible-screens>
  <application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
      android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
      android:name=".MainActivity"
      android:label="@string/title_activity_main" >
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
      </intent-filter>
    </activity>
 </application>
</manifest>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Based on what I can see in the Play Store, you have the RECORD_AUDIO permission in your manifest. By default, that means that the device has to have a microphone, and some tablets will not. Consider adding:

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

Similarly, you have the RECEIVE_SMS permission, which by default requires the device to have telephony capability, and most tablets do not. Please consider adding:

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

And so on.

I recommend that you compare your permissions with the instructions in the documentation to see what else you might need to add: http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...