This repository has been archived by the owner on May 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #183 from pazaan/develop-indra-rc1
Devlop indra RC to master
- Loading branch information
Showing
125 changed files
with
17,388 additions
and
2,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ fabric.properties | |
local.properties | ||
.idea | ||
/app/app.iml | ||
bugfender.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
app/src/main/java/info/nightscout/android/AutoStartActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package info.nightscout.android; | ||
|
||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.os.Bundle; | ||
import android.preference.PreferenceManager; | ||
import android.support.v7.app.AppCompatActivity; | ||
import android.util.Log; | ||
|
||
import info.nightscout.android.medtronic.service.MasterService; | ||
|
||
/** | ||
* Created by John on 22.12.17. | ||
*/ | ||
|
||
public class AutoStartActivity extends AppCompatActivity { | ||
private static final String TAG = AutoStartActivity.class.getSimpleName(); | ||
|
||
@Override | ||
protected void onCreate(Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
Log.d(TAG, "onCreate called"); | ||
|
||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); | ||
|
||
if (prefs.getBoolean("EnableCgmService", false)) { | ||
Log.d(TAG, "MasterService auto starter, starting!"); | ||
|
||
startService(new Intent(getBaseContext(), MasterService.class)); | ||
} | ||
|
||
finish(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
app/src/main/java/info/nightscout/android/AutoStartReceiver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package info.nightscout.android; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.util.Log; | ||
|
||
/** | ||
* Created by Pogman on 4.9.17. | ||
*/ | ||
|
||
public class AutoStartReceiver extends BroadcastReceiver { | ||
private static final String TAG = AutoStartReceiver.class.getSimpleName(); | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
Log.d(TAG, "Boot complete, starting AutoStartActivity"); | ||
|
||
Intent i = new Intent(context, AutoStartActivity.class); | ||
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | ||
context.startActivity(i); | ||
} | ||
} |
Oops, something went wrong.