简体   繁体   English

Mixpanel 推送通知文本在 Android 设备上未放大

[英]Mixpanel push notification text not getting enlarged on Android devices

Account details on Mixpanel: Mixpanel 上的帐户详细信息:

maaz.shaikh@bwellthy.com
Notification text: Hey {{USER_NICK_NAME}}, you can check your HbA1c test result by clicking on it, then click GET STARTED to start your journey with us.

Notification custom packet: { "mp_icnm_l": "app_logo", "mp_icnm_w": "notification_logo", "mp_color": "#FF7531", "sound": "yes", "vibrate": "yes"}

The notification pops up on android device like this, but does not enlarge on dragging it downwards通知会像这样在 android 设备上弹出,但在向下拖动时不会放大

I am using the latest release of Mixpanel(v5.2.1) in the Android code.我在 Android 代码中使用最新版本的 Mixpanel(v5.2.1)。 Mixpanel is using BigStyle Text notifications in their library, so ideally the single line notification on dragging should enlarge on dragging it. Mixpanel 在其库中使用 BigStyle Text 通知,因此理想情况下,拖动时的单行通知应在拖动时放大。

Can you tell me the possible reason for this?你能告诉我这可能的原因吗?

Use BigTextStyle for setting big text in notification.使用 BigTextStyle 在通知中设置大文本。

Notification notification = new Notification.Builder(mContext)
     .setContentTitle("New mail from " + sender.toString())
     .setContentText(subject)
     .setSmallIcon(R.drawable.new_mail)
     .setLargeIcon(aBitmap)
     .setStyle(new Notification.BigTextStyle()
         .bigText(aVeryLongString))
     .build();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM