Skip to content

Commit 19a41fb

Browse files
committedNov 14, 2016
Http server restart on WiFi on
1 parent 48be863 commit 19a41fb

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
 

‎app/build.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "info.dvkr.screenstream"
88
minSdkVersion 21
99
targetSdkVersion 25
10-
versionCode 17
11-
versionName "1.2.1"
10+
versionCode 18
11+
versionName "1.2.2"
1212
resConfigs "en", "ru"
1313
}
1414

@@ -37,7 +37,7 @@ android {
3737
dependencies {
3838
compile fileTree(include: ['*.jar'], dir: 'libs')
3939
compile 'com.android.support:design:25.0.0'
40-
compile 'com.google.firebase:firebase-crash:9.6.1'
40+
compile 'com.google.firebase:firebase-crash:9.8.0'
4141
compile 'org.greenrobot:eventbus:3.0.0'
4242
}
4343

‎app/src/main/java/info/dvkr/screenstream/service/ForegroundService.java

+4
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ public void onReceive(Context context, Intent intent) {
172172
getMainActivityViewModel().setServerAddress(getAppData().getServerAddress());
173173
getMainActivityViewModel().setWiFiConnected(isWiFiConnected);
174174

175+
if (getMainActivityViewModel().isWiFiConnected()) {
176+
EventBus.getDefault().post(new BusMessages(BusMessages.MESSAGE_ACTION_HTTP_RESTART));
177+
}
178+
175179
if ((!getMainActivityViewModel().isWiFiConnected()) && getAppData().isStreamRunning())
176180
serviceStopStreaming();
177181
}

0 commit comments

Comments
 (0)
Failed to load comments.