}
};
- // We'll use this common callback object for our subscriptions below
+ // We'll use this common callback object for our subscriptions below; all it does is trace
+ // events to the log for us
private final IMqttActionListener subal = new IMqttActionListener() {
@Override
public void onSuccess(IMqttToken asyncActionToken) {
Log.e("CtFws", "Sub Fail: " + asyncActionToken, exception);
}
};
+
// And this handles making our subscriptions for us
private class MyMQTTCallbacks implements MqttCallbackExtended {
CtFwSCallbacksMQTT mCtfwscbs;
} else {
Log.d("Service", "IS STALE CONN");
try {
- // TODO Should we waitforcompletion here?
c.disconnect();
} catch (MqttException me) {
// Drop it, we've already dropped the client handle
}
// Must hold strongly since Android only holds weakly once registered.
- // TODO: Option for notification persistence during game?
- // TODO: Option for polling even after game ends?
private final SharedPreferences.OnSharedPreferenceChangeListener mOSPCL
= new SharedPreferences.OnSharedPreferenceChangeListener() {
@Override