【问题标题】:Android permissions in regard of Warning of Google Play Developer policy violation: Action Required关于 Google Play 开发者政策违规警告的 Android 权限:需要采取措施
【发布时间】:2017-02-11 08:51:16
【问题描述】:

我在 Google Play 商店中有一个我创建的应用程序,它显示了停在科特赖克的所有汽车的位置,这些汽车由传感器实时注册,该应用程序显示所有停放的汽车和免费停车位谷歌地图地图视图。

但是,我在几天前收到了一条关于 Google Play 开发者的警告,要求采取隐私政策措施。

我的清单是这样的:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="be.programmeercursussen.parkingkortrijk" >

    <!-- Internet permission for network operations -->
    <uses-permission android:name="android.permission.INTERNET" />

    <!-- Creating Permission to receive Google Maps -->
    <permission
        android:name="be.programmeercursussen.parkingkortrijk.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/parking_icon"
        android:label="@string/app_name"
        android:theme="@style/MaterialTheme" >
        -->
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="my Api key ..." />

        <!-- SplashScreen => startup screen -->
        <activity
            android:name=".SplashScreen"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <!-- Main activity -->
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <!-- ParkingDetail activity -->
        <activity
            android:name=".ParkingDetailActivity"
            android:label="@string/title_activity_parking_detail"
            android:screenOrientation="portrait" >
        </activity>
        <!-- StraatParkeren activity -->
        <activity
            android:name=".StraatParkeren"
            android:label="@string/title_activity_straat_parkeren"
            android:screenOrientation="portrait" >
        </activity>
    </application>

在开发者控制台中,它说我已获得 Get_accounts 权限,这是违规行为,但此权限未在应用程序中硬编码。但后来我发现 Google Play 服务库会自动添加我认为的这个?所以我的编译行

compile 'com.google.android.gms:play-services:7.5.0"

我改成了选择性API部分

compile 'com.google.android.gms:play-services-maps:7.5.0"

将此行更改为此行并生成 apk 并尝试安装它,get_accounts 的问题不再存在于应用程序在智能手机上安装时访问什么的概述中。

所以我在 build.gradle 中的依赖项现在是:

dependencies {
    /*
    find latest gradle versions on : http://gradleplease.appspot.com/
     */
    compile fileTree(dir: 'libs', include: ['*.jar'])
    // appcompat library
    compile 'com.android.support:appcompat-v7:22.2.1'
    // material design library
    compile 'com.android.support:design:22.2.1'
    // recyclerview
    compile 'com.android.support:recyclerview-v7:22.2.1'
    // cardview
    compile 'com.android.support:cardview-v7:22.2.1'
    // google play services, selective API (maps) !!!
    // https://developers.google.com/android/guides/setup#split
    compile 'com.google.android.gms:play-services-maps:7.5.0'
    // Jsoup library
    compile 'org.jsoup:jsoup:1.8.3'
}

现在,如果我根据清单和 build.gradle 生成 apk,它现在会说安装应用程序时将可以访问:

- approximate location (network-based);
- modify or delete the contents of your SD card
- read the contents of your SD card
- view network state (full Internet access)

我确定需要查看网络状态,否则应用无法从 Internet 读取实时 xml。

但我不确定大概的位置是否会给我带来新的隐私侵犯?

我也不知道为什么应用程序可以读取、修改或删除 sd 卡的内容,因为应用程序不应该使用这些内容......是否有任何权限自动设置为清单和构建.gradle?

提前感谢您的帮助,

格兹·戴维

【问题讨论】:

标签: android android-manifest build.gradle


【解决方案1】:

标准清单没有设置权限。

由于您使用的是低于 8.3 版本的 MAPS api,因此您必须包含 WRITE_EXTERNAL_STORAGE 导致修改或删除内容 https://developers.google.com/maps/documentation/android-api/config#specify_android_permissions

location 权限也随 MAPS api 提供

【讨论】:

  • 欢迎您 ;) 如果问题可以接受,请接受答案。
猜你喜欢
  • 2017-06-26
  • 2023-03-19
  • 2021-04-26
  • 2019-07-09
  • 2023-01-08
  • 2023-02-18
  • 2022-08-16
  • 1970-01-01
相关资源
最近更新 更多