I'm Working on a project which records incoming calls and outgoing calls, but with Oreo static broadcast receivers (Broadcast receivers which are registered in the manifest) are not getting triggered. if I register with context, the broadcast will not be triggered once app gets killed.
I want the broadcast receiver to work even if app is closed.
is there any possible way to achieve this Oreo? or any other alternative approach to achieve this? any help will be appreciated.
I'm registering in manifest as below code
<application ...
..
<receiver
android:name=".PhoneCallReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</receiver>
</application>