Titanium App在Play商店中支持的设备数量较少

时间:2016-03-19 23:42:13

标签: android appcelerator appcelerator-titanium

我在使用Titanium的Play商店版本中发布了一个应用程序,但显示的是非常少数量的兼容设备,我无法弄清楚原因。

该应用程序是为最低版本的SDK 14构建的,我对权限没有任何奇怪的要求。这是Titanium生成的AndroidManifest.xml:

    <?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.proximityaware.montrose" android:versionCode="23" android:versionName="2.0.30">
    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
    <application android:icon="@drawable/appicon" android:label="GoMontrose" android:name="GomontroseApplication" android:debuggable="false" android:theme="@style/Theme.AppBlue">
        <activity android:name=".GomontroseActivity" android:label="@string/app_name" android:theme="@style/Theme.Titanium" android:configChanges="keyboardHidden|orientation|screenSize">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:configChanges="keyboardHidden|orientation|screenSize" android:name="org.appcelerator.titanium.TiActivity" android:screenOrientation="portrait"/>
        <activity android:name="org.appcelerator.titanium.TiTranslucentActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/Theme.AppCompat.Translucent"/>
        <activity android:name="ti.modules.titanium.ui.android.TiPreferencesActivity" android:configChanges="screenSize"/>
        <activity android:name="ti.modules.titanium.media.TiCameraActivity" android:configChanges="keyboardHidden|orientation|screenSize" android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar.Fullscreen"/>
        <service android:enabled="true" android:exported="true" android:isolatedProcess="false" android:label="iBeacon" android:name="com.radiusnetworks.ibeacon.service.IBeaconService"/>
        <service android:enabled="true" android:name="com.radiusnetworks.ibeacon.IBeaconIntentProcessor">
            <meta-data android:name="background" android:value="true"/>
            <intent-filter android:priority="1">
                <action android:name="com.proximityaware.montrose.DID_RANGING"/>
                <action android:name="com.proximityaware.montrose.DID_MONITORING"/>
            </intent-filter>
        </service>
        <service android:name="nl.vanvianen.android.gcm.GCMIntentService"/>
        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="HIDDEN"/>
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
        <receiver android:name="nl.vanvianen.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
                <category android:name="android.intent.category.HOME"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
                <category android:name="com.proximityaware.montrose"/>
            </intent-filter>
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
                <category android:name="com.proximityaware.montrose"/>
            </intent-filter>
        </receiver>
    </application>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.VIBRATE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.READ_CALENDAR"/>
    <uses-permission android:name="android.permission.WRITE_CALENDAR"/>
    <uses-permission android:name="com.proximityaware.montrose.permission.MAPS_RECEIVE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
    <uses-permission android:name="com.proximityaware.montrose.permission.C2D_MESSAGE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.USE_CREDENTIALS"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-feature android:name="android.hardware.camera"/>
    <uses-feature android:name="android.hardware.camera.autofocus"/>
    <uses-feature android:name="android.hardware.camera.flash"/>
    <permission android:name="com.proximityaware.montrose.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
    <permission android:name="com.proximityaware.montrose.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
</manifest>

我已在多个设备中测试了该应用,其中Play Store表示该应用不兼容,但如果您下载该应用,则可以使用所有功能。

2 个答案:

答案 0 :(得分:1)

<uses-permission>的默认值为required。因此,请查看您是否可以使用required="false"覆盖一些您绝对不需要的内容。然后在您的代码中确保使用hasCompas等方法测试该功能。

答案 1 :(得分:1)

回答我自己的问题。根据Android有关如何过滤权限的文档:http://developer.android.com/google/play/filters.html

当您使用<uses-permission>时,它会自动设置正确的<uses-feature>。所以你需要做出正确的<uses-feature>不需要。这解决了我的问题。