Skip to content

Commit 719f9e6

Browse files
Merge pull request #712 from TakayukiHoshi1984/modify_fused_location
GeolocationProfileでFusedLocationの対応
2 parents bbafada + a1fa84b commit 719f9e6

8 files changed

Lines changed: 162 additions & 140 deletions

File tree

dConnectDevicePlugin/dConnectDeviceHost/app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ dependencies {
100100
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.2.0'
101101
implementation 'androidx.lifecycle:lifecycle-livedata:2.2.0'
102102
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
103+
implementation 'com.google.android.gms:play-services-location:18.0.0'
104+
implementation 'com.google.android.gms:play-services-maps:17.0.1'
103105
implementation 'com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:1.9.7'
104106
implementation 'org.deviceconnect:dconnect-device-plugin-sdk:2.8.6'
105107
implementation 'org.deviceconnect:dconnect-demo-lib:1.0.1'

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@
126126
<!-- プラグイン本体サービス -->
127127
<service
128128
android:name=".HostDevicePlugin"
129-
android:exported="true">
129+
android:exported="true"
130+
131+
android:foregroundServiceType="location">
130132
<meta-data
131133
android:name="org.deviceconnect.android.deviceplugin"
132134
android:resource="@xml/org_deviceconnect_android_deviceplugin_host" />

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/java/org/deviceconnect/android/deviceplugin/host/activity/GeolocationAlertDialogActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ public void onCreate(Bundle savedInstanceState) {
5454
android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
5555
try {
5656
startActivity(callGPSSettingIntent);
57+
if (mResponse != null) {
58+
MessageUtils.setIllegalDeviceStateError(mResponse,
59+
"Please retry running Geolocation.");
60+
getBaseContext().sendBroadcast(mResponse);
61+
}
62+
5763
} catch (ActivityNotFoundException e) {
5864
if (mResponse != null) {
5965
MessageUtils.setIllegalDeviceStateError(mResponse,

dConnectDevicePlugin/dConnectDeviceHost/app/src/main/java/org/deviceconnect/android/deviceplugin/host/profile/HostGeolocationProfile.java

Lines changed: 145 additions & 133 deletions
Large diffs are not rendered by default.

dConnectManager/dConnectManager/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
buildscript {
44
repositories {
55
google()
6-
jcenter()
6+
mavenCentral()
77
}
88
dependencies {
99
classpath 'com.android.tools.build:gradle:4.1.2'
@@ -17,6 +17,6 @@ allprojects {
1717
repositories {
1818
maven { url 'https://jitpack.io' }
1919
google()
20-
jcenter()
20+
mavenCentral()
2121
}
2222
}

dConnectManager/dConnectManager/dconnect-manager-app/src/main/java/org/deviceconnect/android/manager/DConnectService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ public void onError(final Exception e) {
304304
}
305305
}
306306
}
307-
/**
307+
/*
308308
* DConnectManagerを停止します.
309309
*/
310310
private void stopManager() {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Apr 20 11:14:05 JST 2020
1+
#Tue Jul 13 12:04:58 JST 2021
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
5+
zipStoreBase=GRADLE_USER_HOME
66
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

dConnectSDK/dConnectLibStreaming/libsrt/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def getArtificatId = { ->
1515

1616
android {
1717
compileSdkVersion 29
18-
ndkVersion "21.0.6113669"
18+
ndkVersion '21.4.7075529'
1919

2020
defaultConfig {
2121
minSdkVersion 21

0 commit comments

Comments
 (0)