feat: add realtime service (unused for now)
Signed-off-by: Infi <infi@infi.sh>
This commit is contained in:
parent
33e863a16c
commit
ef06e186c1
|
|
@ -64,6 +64,10 @@
|
|||
<action android:name="com.google.firebase.MESSAGING_EVENT" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name=".api.realtime.RealtimeService"
|
||||
android:exported="false"
|
||||
android:description="@string/realtime_service_description" />
|
||||
|
||||
<activity
|
||||
android:name=".activities.MainActivity"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package chat.revolt.api.realtime
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.os.Binder
|
||||
import android.os.IBinder
|
||||
|
||||
|
||||
class RealtimeService : Service() {
|
||||
class LocalBinder : Binder() {
|
||||
fun getService(): RealtimeService {
|
||||
return RealtimeService()
|
||||
}
|
||||
}
|
||||
|
||||
private val binder = LocalBinder()
|
||||
|
||||
override fun onBind(intent: Intent): IBinder {
|
||||
return binder
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
return START_STICKY;
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -670,4 +670,6 @@
|
|||
<string name="notification_channel_group_social">Friends and Social</string>
|
||||
<string name="notification_channel_friend_requests">Friend Requests</string>
|
||||
<string name="notification_channel_friend_requests_description">Incoming friend requests, as well as accepted requests you\'ve sent.</string>
|
||||
|
||||
<string name="realtime_service_description">This service enables the app to receive messages and updates in real-time.</string>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Reference in New Issue