将我的应用程序上传到 Google Play 后,我尝试将其下载到我的 nexus 7,但没有看到该应用程序。 最重要的是,我在控制台中得到了一个建议,可以将它启用到平板电脑上。 我的 list 中有:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
现在我假设这是因为 SEND_SMS。 问题是,我希望手机有短信功能,但平板电脑没有。
当我尝试时:
<uses-feature android:name="android.permission.SEND_SMS" android:required="false"></uses-feature>
我在手机上遇到异常。
我看了: Android app not available for some tablets in Google Play
Android app showing in Google Play for Phone but not for Google Play for Tablets
Android App is not visible on Google Play store for tablets
但是没有工作,我该怎么办?
谢谢。
最佳答案
我从来没有遇到过这个问题,但我认为你必须“使用-功能”
在 AndroidManifest 中你需要:TO ALL PHONE FEATURES not only sms
- 发送短信
- CALL_PHONE
- 其他
.
<uses-feature android:name="android.permission.SEND_SMS" android:required="false" />
<uses-feature android:name="android.permission.CALL_PHONE" android:required="false" />
CALL_PHONE 权限意味着电话是必需的,但如果您指定不是,您将不会被过滤。
链接:uses-feature - Android Developer site
Each time you upload an application to the Android Market Publisher Site, Android Market scans the application's manifest file. It looks for elements and evaluates them in combination with other elements, in some cases, such as and elements. After establishing the application's set of required features, it stores that list internally as metadata associated with the application .apk and the application version.
When a user searches or browses for applications using the Android Market application, the service compares the features needed by each application with the features available on the user's device. If all of an application's required features are present on the device, Android Market allows the user to see the application and potentially download it. If any required feature is not supported by the device, Android Market filters the application so that it is not visible to the user and not available for download.
关于Android 应用在 Google Play 商店中为平板电脑/手机添加特定权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37561432/