-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored main service to dispose commands
- Loading branch information
Nic Jackson
committed
Jan 25, 2015
1 parent
87f7f4a
commit 51d3995
Showing
17 changed files
with
132 additions
and
75 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
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
22 changes: 12 additions & 10 deletions
22
...c/main/java/com/njackson/events/ActivityRecognitionCommand/ActivityRecognitionStatus.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 |
---|---|---|
@@ -1,21 +1,23 @@ | ||
package com.njackson.events.ActivityRecognitionCommand; | ||
|
||
import com.njackson.events.base.BaseStatus; | ||
|
||
/** | ||
* Created by server on 21/03/2014. | ||
*/ | ||
public class ActivityRecognitionStatus { | ||
public class ActivityRecognitionStatus extends BaseStatus { | ||
|
||
public enum State { | ||
STARTED, | ||
STOPPED, | ||
PLAY_SERVICES_NOT_AVAILABLE, DISABLED | ||
private boolean _playServicesAvailable = true; | ||
public boolean playServicesAvailable() { | ||
return _playServicesAvailable; | ||
} | ||
|
||
public State _state; | ||
public State getState() { return _state; } | ||
|
||
public ActivityRecognitionStatus(State state) { | ||
this._state = state; | ||
public ActivityRecognitionStatus(Status status) { | ||
super(status); | ||
} | ||
|
||
public ActivityRecognitionStatus(Status status, boolean playServicesAvailable) { | ||
super(status); | ||
_playServicesAvailable = playServicesAvailable; | ||
} | ||
} |
25 changes: 7 additions & 18 deletions
25
app/src/main/java/com/njackson/events/GoogleFitCommand/GoogleFitStatus.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 |
---|---|---|
@@ -1,34 +1,23 @@ | ||
package com.njackson.events.GoogleFitCommand; | ||
|
||
import com.google.android.gms.common.ConnectionResult; | ||
import com.njackson.events.base.BaseStatus; | ||
|
||
/** | ||
* Created by server on 21/03/2014. | ||
*/ | ||
public class GoogleFitStatus { | ||
|
||
public enum State { | ||
SERVICE_STARTED, | ||
SERVICE_STOPPED, | ||
SERVICE_DISABLED, | ||
GOOGLEFIT_CONNECTED, | ||
GOOGLEFIT_CONNECTION_FAILED, | ||
GOOGLEFIT_DISCONNECTED | ||
} | ||
|
||
private State _state; | ||
public State getState() { return _state; } | ||
public class GoogleFitStatus extends BaseStatus{ | ||
|
||
private ConnectionResult _connectionResult = null; | ||
public ConnectionResult getConnectionResult() { return _connectionResult; } | ||
|
||
public GoogleFitStatus(State state) { | ||
this._state = state; | ||
public GoogleFitStatus(Status status) { | ||
super(status); | ||
} | ||
|
||
public GoogleFitStatus(State state, ConnectionResult connectionResult) { | ||
_state = state; | ||
public GoogleFitStatus(Status status, ConnectionResult connectionResult) { | ||
super(status); | ||
_connectionResult = connectionResult; | ||
} | ||
|
||
public ConnectionResult getConnectionResult() { return _connectionResult; } | ||
} |
17 changes: 4 additions & 13 deletions
17
app/src/main/java/com/njackson/events/LiveServiceCommand/LiveStatus.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 |
---|---|---|
@@ -1,18 +1,9 @@ | ||
package com.njackson.events.LiveServiceCommand; | ||
|
||
public class LiveStatus { | ||
import com.njackson.events.base.BaseStatus; | ||
|
||
public enum State { | ||
STARTED, | ||
STOPPED, | ||
DISABLED | ||
public class LiveStatus extends BaseStatus{ | ||
public LiveStatus(Status status) { | ||
super(status); | ||
} | ||
|
||
public State _state; | ||
public State getState() { return _state; } | ||
|
||
public LiveStatus(State state) { | ||
this._state = state; | ||
} | ||
|
||
} |
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.