【问题标题】:Android app doesn't show up on tablet marketplaceAndroid 应用程序未出现在平板电脑市场上
【发布时间】:2013-08-13 15:29:17
【问题描述】:

我一直在阅读有关 stackoverflow 的许多问题,但我无法完全解决这个问题。我有一个具有通话功能的应用程序,但我仍然希望平板电脑能够访问它。如果我通过 USB 手动安装该应用程序,它可以在平板电脑上运行,但它不会出现在市场上。我知道关于这个问题还有其他问题,但我也想问我是否有其他权限不适用于平板电脑。

这是我的清单..

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="17"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.CALL_PHONE"/>
    <uses-feature android:name="android.hardware.telephony" android:required="false" />
    <!-- External storage for caching. -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <!-- My Location -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <!-- Maps API needs OpenGL ES 2.0. -->

    <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>
    <!-- End of copy. -->
    <supports-screens android:smallScreens="true" 
        android:normalScreens="true" 
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true" />

我原来只有&lt;uses-permission android:name="android.permission.CALL_PHONE"/&gt;

但我最近添加了..

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

这是否会解决平板电脑无法拨打电话的问题并在平板电脑市场上架?

另外,我列出的还有其他权限需要添加android:required="false" 吗?

另外,这就是我在代码中调用的方式...

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:" + markPhone));
startActivity(callIntent);

【问题讨论】:

    标签: android android-permissions


    【解决方案1】:

    将您的代码更改为使用ACTION_DIAL 而不是ACTION_CALL 调用:

    try {
       Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber));
       startActivity( intent );
    } catch ( Exception e ) {
       // no dialer activity found...
    }
    

    那么你可以完全删除这些:

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

    来自您的清单,因为您的应用不再需要它们。

    【讨论】:

    • 感谢您的回答,我会试试看。但是是否有任何其他权限会使该应用无法在市场上的平板电脑上显示?
    • action_dial和action_call有什么区别?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-02-22
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多