D
Deleted member 103
Guest
Hi,
my app was not approved by google because of this policy (see thread title) .
But I am not aware that where I need background location access.
This is the app manifest:
and these are the permission:
and this is my code with which I ask the permission:
In Main->Activity_Resume is this code :
and in Starter-Service:
I don't know what to change now.
my app was not approved by google because of this policy (see thread title) .
Issue with your appWe found the following issue(s) with your app:
Eligibility Issue Background location access not declared
We detected that your app contains at least one feature that requests background location access, however you have not submitted a permission declaration form for this feature. Please log in to your Play Console and submit a declaration form.
Affected APK(s):
APK:64
About the Permissions & Location Permissions policiesYou may only request permissions that are necessary to implement critical current features or services in your application. You may not use permissions that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. In order for our team to check for compliance, we must be able to review and verify your in-app experience.
App status: RejectedYour app has been rejected and wasn't published due to this policy issue. If you submitted an update, the previous version of your app is still available on Google Play.
But I am not aware that where I need background location access.
This is the app manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="29"/>
<uses-feature android:name="android.hardware.location.gps"/>
<supports-screens android:xlargeScreens="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:anyDensity="true" />)
'android:requiresSmallestWidthDp="500"
'SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:largeHeap, "true")
'Neu ab SDK-29
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
'End of default text.
'Einstellung für Adaptive-icon
SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.WRITE_SETTINGS)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.READ_PHONE_STATE)
'************ AppCompat components ************
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#607D8B</item>
<item name="colorPrimaryDark">#455A64</item>
<item name="colorAccent">#607D8B</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
</resources>
)
'************ Required for Maps ************
AddApplicationText(
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
)
'End of Required for Maps
'************ Crashlytics components ************
'Google Play Services Base - Always required when using Google Play Services or Firebase:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'Firebase Analytics
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'Crashlytics components
CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
'End of Crashlytics components
'GooglePlayBilling - In App Purchases
CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)
'End of GooglePlayBilling
'************ File Provider ****************
'E-Mail senden ab Android 6+
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)
CreateResource(xml, provider_paths,
<external-files-path name="name" path="" />
)
'Ende of File Provider
and these are the permission:
<permission android:name="fg.MasterOfRegolarity.permission.C2D_MESSAGE"
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<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="com.android.vending.BILLING"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="fg.MasterOfRegolarity.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="fg.MasterOfRegolarity.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE"/>
and this is my code with which I ask the permission:
B4X:
Private Sub CheckAndRequestPermission
If Not(Starter.rp.Check( Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)) Then
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
End If
If Not(Starter.rp.Check( Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)) Then
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
End If
End Sub
Sub Activity_PermissionResult (Permission As String, Result As Boolean)
If Result = False Then
Select Permission
Case Starter.rp.PERMISSION_ACCESS_FINE_LOCATION
Msgbox2Async(Starter.Language.Value("ACCESS_FINE_LOCATION"), Starter.Language.Value("PermissionDenied"), "OK","","",Null, False)
Case Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE
Msgbox2Async(Starter.Language.Value("WRITE_EXTERNAL_STORAGE"), Starter.Language.Value("PermissionDenied"), "OK","","",Null, False)
End Select
End If
End Sub
In Main->Activity_Resume is this code :
B4X:
Sub Activity_Resume
...
If Starter.rp.Check( Starter.rp.PERMISSION_ACCESS_FINE_LOCATION) Then
If Not(Starter.GPS1.GPSEnabled) Then
ToastMessageShow(Starter.language.value("msgEnableGpsDevice"), True)
StartActivity(Starter.GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
Else
CallSub(Starter, "StartGPSAndTimer")
End If
End If
...
End Sub
and in Starter-Service:
B4X:
Sub Service_Create
...
GPS1.Initialize("GPS1")
GPSPathPreviuous.Initialize
...
End Sub
Public Sub StartGPSAndTimer
If Not(GPS_On) Then
GPS1.Start(GPSMinTime, GPSMinDistance) 'Listen to GPS with no filters.
GPS_On = True
End If
End Sub
I don't know what to change now.