Skip to content

Commit

Permalink
App crash fix
Browse files Browse the repository at this point in the history
  • Loading branch information
umer0586 committed Nov 28, 2022
1 parent 6c1f4fd commit 0a1ddf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
minSdk 21
targetSdk 31
multiDexEnabled true
versionCode 10
versionName "2.2.0" // bugsnag removed
versionCode 11
versionName "2.2.1"


}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/java/github/umer0586/service/SensorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public int onStartCommand(Intent intent, int flags, int startId)
{

Log.d(TAG, "onStartCommand()");
handleAndroid8andAbove();


boolean localHostPref = sharedPreferences.getBoolean(getString(R.string.pref_key_localhost),false);
Expand All @@ -129,7 +130,7 @@ public int onStartCommand(Intent intent, int flags, int startId)
if(serverErrorListener != null)
serverErrorListener.onError(new UnknownHostException());

handleAndroid8andAbove();

stopForeground(true);

return START_NOT_STICKY;
Expand Down Expand Up @@ -242,7 +243,7 @@ private void handleAndroid8andAbove()
.setContentText("").build();

startForeground(TEMP_NOTIFICATION_ID, tempNotification);
//stopForeground(true);
stopForeground(true);


}
Expand Down

0 comments on commit 0a1ddf8

Please sign in to comment.