Skip to content

Instantly share code, notes, and snippets.

@tanaymondal
Created July 22, 2020 12:53
Show Gist options
  • Save tanaymondal/e7838592621244b11de8539123186b28 to your computer and use it in GitHub Desktop.
Save tanaymondal/e7838592621244b11de8539123186b28 to your computer and use it in GitHub Desktop.
// add on manifest
// <receiver android:name=".receiver.MyCallReceiver" />
public class MyCallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
switch (id) {
case CallNotification.ACCEPT_VIDEO:
// accept call and open call activity
break;
case CallNotification.ACCEPT_AUDIO:
// accept call and open call activity
break;
case CallNotification.REJECT:
// reject call
break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment