我正在Flutter中构建VoIP呼叫应用。我需要提醒用户并在屏幕上显示Widget,以便用户可以在不解锁电话的情况下接受或拒绝来电。所以基本上我需要this的Flutter版本。
您可能需要通过flutter应用程序使用MethodChannel才能进行本机android访问。在android中,您可以使用setFullScreenIntent(..)创建通知官方文档中提到<< [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)