Skip to content

Commit 604aa51

Browse files
authored
Merge pull request #503 from RADAR-base/bg-location-permissions
Fix Play Store rejection, prominent disclosure for ACCESS_BACKGROUND_LOCATION
2 parents fbcf296 + 7289901 commit 604aa51

3 files changed

Lines changed: 56 additions & 6 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:layout_width="match_parent"
4+
android:layout_height="wrap_content">
5+
6+
<LinearLayout
7+
android:orientation="vertical"
8+
android:layout_width="match_parent"
9+
android:layout_height="wrap_content"
10+
android:paddingVertical="32dp"
11+
android:paddingHorizontal="24dp">
12+
13+
<ImageView
14+
android:layout_width="match_parent"
15+
android:layout_height="wrap_content"
16+
android:src="@drawable/baseline_location_on_green_700_48dp"
17+
android:contentDescription="@string/bg_location_disclosure_title" />
18+
19+
<TextView
20+
android:id="@+id/bg_location_disclosure_title"
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:layout_marginTop="24dp"
24+
android:text="@string/bg_location_disclosure_title"
25+
android:textAlignment="center"
26+
android:textSize="20sp"
27+
android:textStyle="bold" />
28+
29+
<TextView
30+
android:id="@+id/bg_location_disclosure_body"
31+
android:layout_width="match_parent"
32+
android:layout_height="wrap_content"
33+
android:layout_marginTop="16dp"
34+
android:text="@string/bg_location_disclosure_body"
35+
android:textIsSelectable="true"
36+
android:linksClickable="true"
37+
android:autoLink="web" />
38+
39+
<TextView
40+
android:id="@+id/bg_location_disclosure_revoke_hint"
41+
android:layout_width="match_parent"
42+
android:layout_height="wrap_content"
43+
android:layout_marginTop="16dp"
44+
android:text="@string/bg_location_disclosure_revoke_hint"
45+
android:textStyle="italic" />
46+
</LinearLayout>
47+
</ScrollView>

radar-commons-android/src/main/res/layout/location_dialog.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
android:layout_width="wrap_content"
1717
android:layout_height="wrap_content"
1818
android:layout_marginTop="32dp"
19-
android:text="@string/location_bg_dialog_title"
19+
android:text="@string/location_dialog_title"
2020
android:textAlignment="center"
2121
android:textSize="20sp"
2222
android:textStyle="bold" />
@@ -25,7 +25,7 @@
2525
android:layout_width="wrap_content"
2626
android:layout_height="wrap_content"
2727
android:layout_marginTop="32dp"
28-
android:text="@string/location_bg_dialog_message"
28+
android:text="@string/location_dialog_message"
2929
/>
3030

3131
<TextView

radar-commons-android/src/main/res/values/strings.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
<string name="retry_oauth_login">Failed to login to authorization service, please retry</string>
1010
<string name="login_failed">Failed to log in</string>
1111

12-
<string name="location_bg_dialog_title">pRMT App uses your \"Location in Background\"</string>
13-
<string name="location_bg_dialog_message">This app collects location data to enable Bluetooth Low Energy and/or location tracking as
14-
part of the study even when the app is closed or not in use.</string>
1512
<string name="dialog_usage">The researcher(s) only use the collected data in the study you consented to.</string>
1613

17-
<string name="location_dialog_title">pRMT App uses your \"Location\"</string>
14+
<string name="location_dialog_title">This app uses your \"Location\"</string>
1815
<string name="location_dialog_message">Location information is needed to enable Bluetooth Low Energy and/or location tracking as part of the study.</string>
1916

17+
<string name="bg_location_disclosure_title">Allow background location access?</string>
18+
<string name="bg_location_disclosure_body">This app collects your device location, including when the app is closed or not in use, to keep your connected study device (e.g. Bluetooth wearable) reachable and to record location samples for the research study you consented to. Location data is uploaded to the study server you agreed to. Tap Accept to be asked by Android for the &quot;Allow all the time&quot; location permission.</string>
19+
<string name="bg_location_disclosure_revoke_hint">You can revoke this permission at any time from Android Settings.</string>
20+
<string name="disclosure_accept">Accept</string>
21+
<string name="disclosure_reject">Reject</string>
22+
2023
<string name="usage_tracking_dialog_title">Enable \"Usage tracking\"</string>
2124
<string name="usage_tracking_dialog_message">Enable usage access to keep track of what kind of applications you use.</string>
2225
<string name="usage_tracking_dialog_help">After click \"OK\", select RADAR pRMT from the list and enable \"Usage access\"</string>

0 commit comments

Comments
 (0)