Start a service on firebase datachange Listener?
0
I have been working on an application where i need to trigger a defined service on firebase datachange listener. I tried using IntentService but it doesn't make it to happen. I want to start a background service when there's a change occurs in firebase database. Hope you could help me out. Manifest: <service android:name=".modules.call.notifications.CallNotificationService" android:exported="false"> </service> Service: class CallNotificationService : IntentService(CallNotificationService::class.simpleName){ private var pActivity = MainBaseActivity() override fun onHandleIntent(intent: Intent?) { VFirebaseQueryManager.getUserReference(pActivity?.profile?.user_id?.toLong()!!)?.addValueEventListener(object : ValueEventListener{ ...