Skip to content

Commit

Permalink
Http server restart on WiFi on
Browse files Browse the repository at this point in the history
  • Loading branch information
dkrivoruchko committed Nov 14, 2016
1 parent 48be863 commit 19a41fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "info.dvkr.screenstream"
minSdkVersion 21
targetSdkVersion 25
versionCode 17
versionName "1.2.1"
versionCode 18
versionName "1.2.2"
resConfigs "en", "ru"
}

Expand Down Expand Up @@ -37,7 +37,7 @@ android {
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:design:25.0.0'
compile 'com.google.firebase:firebase-crash:9.6.1'
compile 'com.google.firebase:firebase-crash:9.8.0'
compile 'org.greenrobot:eventbus:3.0.0'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ public void onReceive(Context context, Intent intent) {
getMainActivityViewModel().setServerAddress(getAppData().getServerAddress());
getMainActivityViewModel().setWiFiConnected(isWiFiConnected);

if (getMainActivityViewModel().isWiFiConnected()) {
EventBus.getDefault().post(new BusMessages(BusMessages.MESSAGE_ACTION_HTTP_RESTART));
}

if ((!getMainActivityViewModel().isWiFiConnected()) && getAppData().isStreamRunning())
serviceStopStreaming();
}
Expand Down

0 comments on commit 19a41fb

Please sign in to comment.