over screen incoming phone call like whatsapp

corradocorrado Member ✭✭

Hello, how to do over screen incoming phone call like whatsapp? Thanks in advance.

Posts

  • Elin_DoughouzElin_Doughouz TRMember ✭✭
    edited June 2018

    You can make it as a Notifcation ongoing call

    `
    NotificationCompat.Builder builder = new NotificationCompat.Builder(Application.Context);

    var Vibrate = new long[] { 1000, 1000 }; `

    `

                builder.SetPriority(NotificationCompat.PriorityMax);
                builder.SetColorized(true);
                builder.SetColor(Color.ParseColor(Settings.MainColor)).SetDeleteIntent(cancelIntent);
                builder.SetSmallIcon(Resource.Drawable.icon)
                    .SetContentTitle(Title).SetAutoCancel(true)
                    .SetContentText(Long_Description)
                    .SetChannelId(CHANNEL_ID)
                    .SetContentIntent(cancelIntent).SetLights(Color.Red, 3000, 3000)
                    .SetSound(uri)
                    .SetOngoing(true).SetVibrate(Vibrate)
                    .SetFullScreenIntent(MainIntent, true)
                    .AddAction(Resource.Drawable.ic_close_black_24dp, Language.Lbl_Dismiss, cancelIntent)
                    .AddAction(Resource.Drawable.ic_action_notifcation_phone, Language.Lbl_Answer, GetAnswerIntent);`
    
  • corradocorrado Member ✭✭

    What are cancelIntent, MainIntent,, Language.Lbl_Dismiss, Language.Lbl_Answer e GetAnswerIntent?

Sign In or Register to comment.