谷歌播放说我正在请求位置许可(我不是) [英] google play says I’m requesting location permission (I’m not)

查看:32
本文介绍了谷歌播放说我正在请求位置许可(我不是)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(问题已解决)你好谷歌没有发布我的应用程序进行后台位置访问目前仅对当前位置使用这些权限,不使用后台位置访问这些是清单文件和我的 Gradle 中的权限,请建议

(Problem is Solved) Hello google are not publishing my app for background location access currently am using these permissions for the current location only and am not using background location access these are the permissions in the manifest file and my Gradle please advice

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

apply plugin: 'com.android.application'

android {
compileSdkVersion 30


defaultConfig {
    applicationId "*****"
    minSdkVersion 17
    targetSdkVersion 30
    versionCode 82
    versionName "26"
    multiDexEnabled true
    vectorDrawables.useSupportLibrary = true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
dexOptions {
    javaMaxHeapSize "8g"
}
repositories {
    mavenCentral()
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.wunderlist:sliding-layer:1.2.5'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.google.firebase:firebase-messaging:20.2.4'
implementation 'com.google.firebase:firebase-analytics:18.0.2'
implementation 'com.google.firebase:firebase-crashlytics:17.3.1'
implementation 'com.google.maps:google-maps-services:0.1.20'
implementation 'com.google.android.libraries.places:places:2.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.commit451:PhotoView:1.2.4'
}

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

添加此行后尚未工作

<uses-permission 
android:name="android.permission.ACCESS_COARSE_LOCATION" 
tools:node="remove"/>

<uses-permission 
android:name="android.permission.ACCESS_BACKGROUND_LOCATION" 
tools:node="remove" />

<uses-permission   
android:name="com.google.android.finsky.permission.
BIND_GET_INSTALL_REFER 
RER_SERVICE" tools:node="remove" />

这是合并的清单文件数据

and this is the merged manifest file data

<uses-permission
    android:name="android.permission.INTERNET" />

<uses-permission
    android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-permission
    android:name="android.permission.ACCESS_WIFI_STATE" />

<uses-feature
    android:glEsVersion="0x20000"
    android:required="true" />

<uses-permission
    android:name="android.permission.WAKE_LOCK" />

<uses-permission
    android:name="com.google.android.c2dm.permission.RECEIVE" />





also this services
<service        
android:name="com.google.android.datatransport.runtime.scheduling.
jobscheduling.JobInfoSchedulerService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />

<receiver
android:name="com.google.android.
datatransport.runtime.scheduling.jobscheduling.
AlarmManagerSchedulerBroadcastReceiver"
android:exported="false" />

<provider   
android:name="androidx.lifecycle.
ProcessLifecycleOwnerInitializer"
android:exported="false"
android:multiprocess="true"
android:authorities="com
.dolifecycle-process" 
/>

<service
android:name="com.google.android.datatransport
.runtime.backends.TransportBackendDiscovery"
android:exported="false">

<meta-data android:name="backend:com.google.android.
datatransport.cct.CctBackendFactory"
android:value="cct" />
</service>


<provider
android:name="com.google.firebase.provider
.FirebaseInitProvider"
android:exported="false"
android:authorities="com.firebaseinitprovider"
android:initOrder="100"
android:directBootAware="true" />

<service
android:name="com.google.android.gms.measurement
.AppMeasurementService"


<receiver
android:name="com.google.android.gms.measurement
.AppMeasurementReceiver"

android:name="com.google.android.gms.common.api.GoogleApiActivity"

<receiver
android:name="com.google.firebase.iid.
FirebaseInstanceIdReceiver"

但没有任何迹象表明我正在使用后台定位服务,所以我将 apk 上传到了 google play 服务,但由于同样的原因我被拒绝了,如果还有什么我可以帮我解决的,谢谢

but nothing shows that am using background location service so I uploaded the apk to google play service but I got rejected for the same reason, if there is anything else that I can do help me out thanx

谷歌消息未声明后台位置访问权限我们检测到您的应用至少包含一项要求在后台访问位置的功能,但是,您的权限声明表并未反映这一点.请登录您的 Play 管理中心,重新提交您的位置声明表.您可以从您的应用中删除后台的位置信息,也可以表明该使用情况在后台进行.

google messages Background location access not declared We detected that your app contains at least one feature that requests access to the location in the background, however, your permission declaration form did not reflect this. Please log in to your Play Console to resubmit your location declaration form. You may either remove the location in the background from your app or indicate that the usage is in the background.

问题的解决方法是:

1- 从您的项目转到 gradle-wrapper.properties 并将 distributionUrl 更改为

1- from your project go to gradle-wrapper.properties and change the distributionUrl to

distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip

distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip

2- 删除任何访问该位置的单例类检查您的应用程序类

2- remove any singleton class that access the location check your Application class

3- 在 gitit 之前立即显示权限对话框

3- Show the permission dialog immediately before gitting it

4- 添加到您的清单文件

4- add to your manifast file

<uses-permission 
android:name="android.permission.ACCESS_COARSE_LOCATION" 
tools:node="remove" />
<uses-permission 
android:name="android.permission.ACCESS_BACKGROUND_LOCATION" 
tools:node="remove" />

5- 将 build.gradle 文件中的 compileSdkVersion 和 targetSdkVersion 更改为 30

5- change the compileSdkVersion and targetSdkVersion to 30 from build.gradle file

谷歌控制台

1- 在我的情况下删除测试中的所有旧版本,旧版本在 28 上运行.SDK 因此删除它们

1- remove any old builds on the testing in my case there were old builds running on 28. SDK so remove them

2- 从谷歌控制台点击应用内容".然后应用程序访问"然后所有或某些功能受到限制"然后管理"并在需要时添加对您的应用程序的访问权限

2- from google console click "App Content". then "App access" then "All or some functionality is restricted" then "manage" and add the access to your app if its needed one

3- 转到应用内容",然后转到敏感应用权限";然后是位置权限"和位置权限"并从您的应用是否在后台访问定位于 Android 9(Pie)或更低版本(SDK 级别 28 或更低)的 APK 或应用程序包中的位置?"中选择否?

3- go to "App Content" then "Sensitive app permissions" then "Location permissions" and "Location permissions" and select No from "Does your app access location in the background in APKs or app bundles targeting Android 9 (Pie) or older (SDK level 28 or lower)?"

现在提交您的构建可能需要一些时间在我的情况下需要 12 天才能在 google play thanx

now submit your build it can take time in my case it took 12 days to be on google play thanx

推荐答案

其中一个库正在使用它.

Either one of these libraries are using it.

implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.libraries.places:places:2.4.0'

您可以通过打开 AndroidManifes.xml 并使用合并清单"来找出答案.此编辑器底部的选项卡.找到该权限,您将能够通过选择它来查看包含它的人.

You can find out by opening AndroidManifes.xml and using the "Merged Manifest" tab at the bottom of this editor. Locate the permission and you will be able to see who is including it by selecting it.

顺便说一句,如果您不需要它,您可以使用以下方法将其从清单中删除:

BTW you can remove it from your manifest if you don't need it by using:

<uses-permission
     android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
     tools:node="remove" />

这篇关于谷歌播放说我正在请求位置许可(我不是)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆