Aurora Push status bar icon not fully displayed (original)

Source: Internet
Author: User

Aurora Forum Many people encounter this problem: The push icon is intercepted at the instant the push message is received. In the Aurora Forum Most people answer is the picture adaptation, both in the different Drawble folder put push icon, however, Aurora push default call app Launcher_icon, my phone resolution is 1920* 1080, call the Drawable-xhdpi folder inside the Launcher_icon, the size of 144*144, and the drawable-xhdpi in the notification of the size of the icon is 48*48 to display the whole, so the phenomenon of interception is very normal however.

The question is, since the Aurora is calling the app's Launcher_icon by default, should we change the app's Launcher_icon to 48*48? This way our app icon appears on the desktop with a small, white edge. Asked the Aurora Technical customer service, do not know whether they do not understand my meaning or what, their answer is still to adapt to the icon. Oh, to change the app icon size to 48*48?

Of course, the Aurora also provides the corresponding solution, but the official document only said in the client, but did not say to the server to do the corresponding settings, resulting in a lot of this cock walk detours.


1. Client settings: http://docs.jpush.cn/pages/viewpage.action?pageId=2621539

The original text reads as follows:

Client-defined notification bar style

The custom notification bar style is done on the client. Refer to the notification bar style customization API to see what features are supported.

Custom notification bar Style design
    • With a Pushnotificationbuilder concept, developers use the Setpushnotificationbuilder method to specify numbers for some type of pushnotificationbuilder.

    • Setpushnotificationbuilder can be called anywhere after Jpushinterface.init (), which can be a developer-applied logic to trigger a call, or a call to initialize.

    • You only need to set it once, and the Jpush SDK will remember this setting. The next time you receive a push notification, you will find Pushnotificationbuilder to display and execute according to the number specified in the notification.

Api-setdefaultpushnotificationbuilder Set Default

This API changes the default notification bar style of number 0.

Api-setpushnotificationbuilder designation Number

This API sets a custom Pushnotificationbuilder (notification style builder) for a developer-specified number.

Example-Pushnotificationbuilder of the foundation

Custom sound, vibration, flashing lights and other Notification styles.

int Builderid =1;

BasicPushNotificationBuilder builder = new BasicPushNotificationBuilder(MainActivity.this);builder.statusBarDrawable = R.drawable.jpush_notification_icon;builder.notificationFlags = Notification.FLAG_AUTO_CANCEL;  //设置为自动消失builder.notificationDefaults = Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE | Notification.DEFAULT_LIGHTS;  // 设置为铃声与震动都要

JPushInterface.setPushNotificationBuilder(builderId , builder);


  client needs to set the type of message, i.e. builderid  , when the service side sends the corresponding type, the Aurora will first make the message type match, if not match, then the default call the app's icon, if match, invokes the client-specified icon builder.statusbardrawable.

2, server configuration, also need to set the message type builderid,builderid must be consistent with the client  . We use the Java SDK, the SDK for other languages can also be set builderid.

Set the key code as follows:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/7B/07/wKiom1bFQoOD-UyuAAKt8nceRf4988.jpg "title=" The Aurora push icon is not fully displayed. jpg "alt=" wkiom1bfqood-uyuaakt8ncerf4988.jpg "/>


附:


通知的图标大小

drawable-xhdpi 48*48

DRAWABLE-HDPI 36*36

DRAWABLE-MDPI 24*24


Aurora Push status bar icon not fully displayed (original)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.