I am building a VoIP calling app in Flutter. I need to alert the user and show a Widget on the screen so that the user can accept or reject incomming calls without unlocking the phone. So basically I need a Flutter version for this.
Asked
Active
Viewed 1,705 times
5
-
Not sure if you can do this without doing a native call using a Flutter Platform Channel – Ricardo Markiewicz Jan 18 '20 at 23:53
-
Showing a notification not enough? – Blasanka Jan 19 '20 at 00:38
-
Actually I need something similar to the WhatsApp calling screen. With a sliding button widget. – Akas Antony Jan 19 '20 at 07:35
1 Answers
1
You may need to use MethodChannel via your flutter app for native android access. In android, you can create a notification , with setFullScreenIntent(..) Official documentation mentions , Only for use with extremely high-priority notifications demanding the user's immediate attention, such as an incoming phone call
NotificationCompat.Builder builder = new NotificationCompat.Builder(this,"methodId")
.setContentText(" content ")
.setContentTitle("Title..")
.setFullScreenIntent(...)
.setSmallIcon(R.drawable.launch_background)

mykey
- 1,943
- 19
- 13