public abstract class AbstractPushNotification extends java.lang.Object implements PushNotification
| 限定符和类型 | 字段和说明 |
|---|---|
protected android.content.Context |
context |
protected android.os.Handler |
handler |
protected PushNotificationBuilder |
pushNotificationBuilder |
protected static java.lang.String |
TAG |
| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractPushNotification(android.content.Context context,
PushNotificationBuilder pushNotificationBuilder) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
advanceSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3)
default: light,vibrate,sound and all
onGoing: cannot delete notification if you do not click the notification
HeadUpNotification: show global notification
|
protected void |
appIconSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3)
notification builder set app icon
|
protected void |
basicSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3,
android.app.PendingIntent clickIntent,
android.app.PendingIntent deleteIntent)
basic setting include
title: the notification title
content: the notification main content
autoCancel: notification disappear when click it
smallIcon: the icon show in the status bar,the default icon is the application icon
clickIntent: action when click notification
deleteIntent: action when delete notification
|
protected void |
buildBigContentView(android.app.Notification notification,
MessageV3 messageV3)
for build notification bigContentView
|
protected void |
buildContentView(android.app.Notification notification,
MessageV3 messageV3)
for build notification contentview
|
protected void |
buildExpandableContent(android.app.Notification.Builder builder,
MessageV3 messageV3)
builder for expandable content such text and picture
this content can build with NotificationCompat builder
|
protected android.app.Notification |
construtNotificationFinal(MessageV3 messageV3,
android.app.PendingIntent clickIntent,
android.app.PendingIntent deleteIntent)
construct Notification
notification builder
build notification expandable Content
notification contentView
build notification contentView and bigContentView
|
protected android.app.PendingIntent |
createClickIntent(MessageV3 messageV3)
create click intent for click callback
此回调需要跳转到目标应用内回调
|
protected android.app.PendingIntent |
createDeleteIntent(MessageV3 messageV3)
create delete Intent for delete notification
此回调在通知栏发送应用内回调即可
|
protected android.app.PendingIntent |
createStateIntent(MessageV3 messageV3)
创建notification 状态回调,用于通知栏数据上报统计
此回调在通知栏发送应用内回调即可
|
protected void |
dismissFloatNotification(android.app.NotificationManager notificationManager,
int notificationId,
MessageV3 messageV3)
show head_notification and setOngoing dismiss float notification and show normal notification
|
android.graphics.Bitmap |
getAppIcon(android.content.Context context,
java.lang.String packageName)
获取当前应用图标
|
android.graphics.Bitmap |
getBitmapFromURL(java.lang.String src) |
protected java.lang.String |
getFlymeGreenNotificationSetting(MessageV3 messageV3)
获取Flyme绿色通道的配置
|
protected boolean |
isOnMainThread()
check current thread
|
protected boolean |
isScreenOnAndUnlock()
check screen status and screen lock status
|
void |
show(MessageV3 messageV3) |
protected static final java.lang.String TAG
protected android.content.Context context
protected PushNotificationBuilder pushNotificationBuilder
protected android.os.Handler handler
protected AbstractPushNotification(android.content.Context context,
PushNotificationBuilder pushNotificationBuilder)
protected void buildExpandableContent(android.app.Notification.Builder builder,
MessageV3 messageV3)
builder - the notification buildermessageV3 - message which construct notificationprotected void buildContentView(android.app.Notification notification,
MessageV3 messageV3)
notification - messageV3 - protected void buildBigContentView(android.app.Notification notification,
MessageV3 messageV3)
messageV3 - notification - protected void appIconSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3)
builder - messageV3 - protected android.app.Notification construtNotificationFinal(MessageV3 messageV3, android.app.PendingIntent clickIntent, android.app.PendingIntent deleteIntent)
protected android.app.PendingIntent createClickIntent(MessageV3 messageV3)
messageV3 - protected android.app.PendingIntent createDeleteIntent(MessageV3 messageV3)
messageV3 - protected android.app.PendingIntent createStateIntent(MessageV3 messageV3)
messageV3 - protected void basicSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3,
android.app.PendingIntent clickIntent,
android.app.PendingIntent deleteIntent)
protected void advanceSettingBuilder(android.app.Notification.Builder builder,
MessageV3 messageV3)
public android.graphics.Bitmap getBitmapFromURL(java.lang.String src)
public android.graphics.Bitmap getAppIcon(android.content.Context context,
java.lang.String packageName)
protected boolean isOnMainThread()
protected boolean isScreenOnAndUnlock()
protected java.lang.String getFlymeGreenNotificationSetting(MessageV3 messageV3)
messageV3 - public void show(MessageV3 messageV3)
show 在接口中 PushNotificationprotected void dismissFloatNotification(android.app.NotificationManager notificationManager,
int notificationId,
MessageV3 messageV3)