Switch to ~control for control channel
This commit is contained in:
parent
58b56383dc
commit
957c351c96
2 changed files with 4 additions and 1 deletions
|
@ -157,6 +157,9 @@ class ApiService {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "NtfyApiService"
|
private const val TAG = "NtfyApiService"
|
||||||
|
|
||||||
|
// These constants have corresponding values in the server codebase!
|
||||||
|
const val CONTROL_TOPIC = "~control"
|
||||||
const val EVENT_MESSAGE = "message"
|
const val EVENT_MESSAGE = "message"
|
||||||
const val EVENT_KEEPALIVE = "keepalive"
|
const val EVENT_KEEPALIVE = "keepalive"
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ class MainActivity : AppCompatActivity(), ActionMode.Callback, AddFragment.Subsc
|
||||||
notifier!!.createNotificationChannels()
|
notifier!!.createNotificationChannels()
|
||||||
|
|
||||||
// Subscribe to control Firebase channel (so we can re-start the foreground service if it dies)
|
// Subscribe to control Firebase channel (so we can re-start the foreground service if it dies)
|
||||||
messenger.subscribe("~keepalive")
|
messenger.subscribe(ApiService.CONTROL_TOPIC)
|
||||||
|
|
||||||
// Background things
|
// Background things
|
||||||
startPeriodicPollWorker()
|
startPeriodicPollWorker()
|
||||||
|
|
Loading…
Reference in a new issue