-->

About Notification for Missed Call in android

2020-08-01 07:32发布

问题:

I am using voip sip for calling processing calls when Push-Notification received. I want to create top bar notification for missed call . I am already processing calls when Push-Notification receives. I already searched lot of things but nothing helped me.

My question is, i'm making calls after receiving Push-Notification, so likewise i want to display notification after receiving Push Notification, so for that how do I differentiate for which i am receiving Push-Notification.

回答1:

The notification you are receiving it always contains extra information, all you have to do in compare both notification packets and identify the key using which you can differentiate both of notification. If you are not able to find such key ask API developer to provide it.



回答2:

You can get something unique in notification response for deffrentiate means notifications you are getting extra data please check in notification response or check in voip sip's documentation (if not getting this extra information ask api developer to provide it) using it you can identify whether you are receiving missed call notification or call notification.

Hope this may helps you.



回答3:

https://developer.android.com/reference/android/provider/CallLog.Calls.html#DURATION

Call duration == 0, so call was missed