Closed AliRHp closed 6 years ago
از کد زیر توی کلاس اپلکیشن استفاده کنین که توی داکیومنت توضیح داده شده
NotificationHandler myHandler = new NotificationHandler() {
@Override
public Class getActivityClass(ChabokNotification chabokNotification) {
// return preferred activity class to be opened on this message's notification
return YOUR_MAIN_ACTIVITY_CLASS.class;
}
@Override
public boolean buildNotification(ChabokNotification chabokNotification, NotificationCompat.Builder builder) {
// use builder to customize the notification object
// return false to prevent this notification to be shown to the user, otherwise true
return false;
}
};
chabok.addNotificationHandler(myHandler);
این کد همیشه زمانی که پوش نویتیفکیشن بیاد تریگر خواهد شد
وقتی اپلیکیشن ران نیست دیتا نوتیفیکیشن رو از کجا بخونیم