-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move stingray readings to base service
- Loading branch information
1 parent
1e65c38
commit d26a876
Showing
9 changed files
with
132 additions
and
68 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
app/src/main/java/org/stingraymappingproject/api/app/AppBaseStringrayActivity.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,22 @@ | ||
package org.stingraymappingproject.api.app; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
import org.stingraymappingproject.api.clientandroid.activities.BaseStingrayActivity; | ||
|
||
/** | ||
* Created by Marvin Arnold on 27/08/15. | ||
*/ | ||
public abstract class AppBaseStringrayActivity extends BaseStingrayActivity { | ||
@Override | ||
public void startStingrayClientService() { | ||
if (!mBoundToStingrayAPIService) { | ||
// Bind to LocalService | ||
Intent intent = new Intent(AppBaseStringrayActivity.this, AppStringrayAPIClientService.class); | ||
//Start Service before binding to keep it resident when activity is destroyed | ||
startService(intent); | ||
bindService(intent, mStingrayAPIServiceConnection, Context.BIND_AUTO_CREATE); | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/org/stingraymappingproject/api/app/AppStringrayAPIClientService.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,10 @@ | ||
package org.stingraymappingproject.api.app; | ||
|
||
import org.stingraymappingproject.api.clientandroid.StingrayAPIClientService; | ||
|
||
/** | ||
* Created by Marvin Arnold on 27/08/15. | ||
*/ | ||
public class AppStringrayAPIClientService extends StingrayAPIClientService { | ||
// receive callbacks | ||
} |
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
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
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
Oops, something went wrong.