Skip to content

Commit

Permalink
Merge pull request #151 from RADAR-base/target-sdk-34
Browse files Browse the repository at this point in the history
Updated Radar-prmt to Target SDK 34 (Android 14)
  • Loading branch information
peyman-mohtashami authored Jan 8, 2025
2 parents df1a3fc + bf58300 commit a950bb6
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 11 deletions.
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ android {
defaultConfig {
applicationId "org.radarcns.detail"
minSdkVersion 26
targetSdkVersion 33
versionCode 62
versionName "1.2.1"
targetSdkVersion 34
versionCode 69
versionName "1.2.7"
manifestPlaceholders = ["appAuthRedirectScheme": "org.radarbase.passive.app"]
multiDexEnabled true
ndkVersion "25.2.9519653"
Expand Down Expand Up @@ -101,7 +101,7 @@ dependencies {
implementation "org.radarbase:radar-android-weather:$radar_commons_android_version"
implementation "org.radarbase:radar-android-audio:$radar_commons_android_version"
implementation "org.radarbase:radar-android-faros:$radar_commons_android_version"
implementation "org.radarbase:radar-android-polar:$radar_commons_android_version"
// implementation "org.radarbase:radar-android-polar:$radar_commons_android_version"
implementation "org.radarbase:radar-android-google-sleep:$radar_commons_android_version"
implementation "org.radarbase:radar-android-google-activity:$radar_commons_android_version"
implementation "org.radarbase:radar-android-google-places:$radar_commons_android_version"
Expand Down
15 changes: 14 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<!-- Foreground service types permissions (for targeting devices running on android 14 and above) -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_HEALTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />

<supports-screens android:largeScreens="true"
android:xlargeScreens="true" />

Expand Down Expand Up @@ -117,7 +124,13 @@
android:name=".SettingsActivity"
android:screenOrientation="userPortrait"
android:parentActivityName=".MainActivityImpl" />
<service android:name=".RadarServiceImpl" />

<service
android:name=".RadarServiceImpl"
android:exported="false"
android:foregroundServiceType="dataSync|health|location|microphone|connectedDevice" >
</service>

<service android:name=".AuthServiceImpl" />

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class PrivacyPolicyFragment : Fragment() {
projectId = args.getString(PROJECT_ID_KEY)
userId = args.getString(USER_ID_KEY)
baseUrl = args.getString(BASE_URL_PROPERTY)
privacyPolicyUrl = args.getString(PRIVACY_POLICY_URL_PROPERTY)
dataCollectionUrl = args.getString(PRIVACY_POLICY)
privacyPolicyUrl = args.getString(PRIVACY_POLICY) //args.getString(PRIVACY_POLICY_URL_PROPERTY)
dataCollectionUrl = "https://radar-base.org/docs/4048-2/"
}

override fun onCreateView(
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,5 @@
<string name="reject_privacy_policy_button">Reject</string>
<string name="consent">Consent</string>
<string name="filter_split_regex">,</string>
<string name="special_fgs_explanation">RadarService operates with plugins and modules that may need permissions beyond standard foreground service types. Defining a special use subtype ensures compliance with Android’s requirements for permissions that may vary dynamically based on active plugins</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import org.radarbase.passive.phone.PhoneContactListProvider
import org.radarbase.passive.phone.PhoneLocationProvider
import org.radarbase.passive.phone.PhoneSensorProvider
import org.radarbase.passive.phone.audio.input.PhoneAudioInputProvider
import org.radarbase.passive.polar.PolarProvider
//import org.radarbase.passive.polar.PolarProvider
import org.radarbase.passive.phone.usage.PhoneUsageProvider
import org.radarbase.passive.weather.WeatherApiProvider

Expand All @@ -45,7 +45,7 @@ class RadarServiceImpl : RadarService() {
OpenSmileAudioProvider(this),
E4Provider(this),
FarosProvider(this),
PolarProvider(this),
// PolarProvider(this),
PhoneBluetoothProvider(this),
PhoneContactListProvider(this),
PhoneLocationProvider(this),
Expand Down
14 changes: 13 additions & 1 deletion app/src/selfRelease/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<!-- TODO: Check if necessary -->
<uses-permission android:name="android.permission.SET_ALARM"/>

<!-- Foreground service types permissions (for targeting devices running on android 14 and above) -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_HEALTH" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />

<supports-screens android:largeScreens="true"
android:xlargeScreens="true" />

Expand Down Expand Up @@ -121,7 +128,12 @@
android:screenOrientation="userPortrait"
android:parentActivityName=".MainActivityImpl" />

<service android:name=".RadarServiceImpl" />
<service
android:name=".RadarServiceImpl"
android:exported="false"
android:foregroundServiceType="dataSync|health|location|microphone|connectedDevice" >
</service>

<service android:name=".AuthServiceImpl" />

<receiver android:name=".UpdateAlarmReceiver" />
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android.defaults.buildfeatures.buildconfig=true
android.useAndroidX=true
android.enableJetifier=true

radar_commons_android_version=1.2.5
radar_commons_android_version=1.4.1-SNAPSHOT

kotlin_version=1.9.24
gradle_version=8.6
Expand Down

0 comments on commit a950bb6

Please sign in to comment.