0

Below is my code for bubble notification,

Notification.BubbleMetadata bubbleData =
                    new Notification.BubbleMetadata.Builder()
                            .setIcon(Icon.createWithResource(this, R.drawable.notification_logo))
                            .setIntent(incomingCallPendingIntent)
                            .build();



// Create notification
            Person chatBot = new Person.Builder()
                    .setBot(true)
                    .setName("BubbleBot")
                    .setImportant(true)
                    .build();

            Notification.Builder builder =
                    new Notification.Builder(this, NOTIFICATION_CHANNEL_ID)
                            .setContentIntent(incomingCallPendingIntent)
                            .setLargeIcon(getCircleBitmap(drawable.getBitmap()))
                            .setOngoing(true)
                            .setColor(ContextCompat.getColor(context, R.color.blue))
                            .setContentTitle(displayName)
                            .setContentText("Incoming call from "+number)
                            .setDefaults(Notification.DEFAULT_SOUND | Notification.DEFAULT_LIGHTS | Notification.DEFAULT_VIBRATE)
                            .setFullScreenIntent(incomingCallPendingIntent, true)
                            .setSmallIcon(R.drawable.notification_logo)
                            .setAutoCancel(false)
                            .setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE))
                            .setVibrate(vibrate)
                            .setCategory(NotificationCompat.CATEGORY_CALL)
                            .setSmallIcon(R.drawable.notification_logo)
                            .addAction(0,"Answer",answerPendingIntent)
                            .addAction(0,"Cancel",cancelPendingIntent)
                            .setBubbleMetadata(bubbleData)
                            .addPerson(chatBot)
            startForeground(2,builder.build());

In this, setDefaults,setSound, setVibrate, addAction are deprecated.

And when receiving Incoming call Notification, on tapping the notification not able to get full screen Intent. Instead of that White screen came and goes off. Meanwhile Action buttons are working fine.Only able to see full screen intent activity when the device is in DO NOT DISTURB MODE. I doesn't know whats wrong with my code. Anybody help me with this. Thanks in advance.

If anybody faced this issues, then please share me your ideas

Kousalya
  • 700
  • 10
  • 29
  • Any warnings or errors or unusual logs in logcat? – spartygw May 27 '20 at 14:39
  • @spartygw Unfortunately Im not having android 10 device right now. Testing has been done by someones device. Without debugging finding difficulty to identify the cause. – Kousalya May 27 '20 at 14:52

0 Answers0