Push notification android上的Ionic2 ionic云通知

Push notification android上的Ionic2 ionic云通知,push-notification,notifications,ionic2,android-notifications,ionic-cloud,Push Notification,Notifications,Ionic2,Android Notifications,Ionic Cloud,在Android上。当应用程序关闭且我单击通知时,应用程序将打开,但通知不会调用所需的功能。为什么?我尝试了很多东西,但都没用 简化代码: 前端设置: const cloudSettings: CloudSettings = { 'core': { 'app_id': '61d7358c' }, 'push': { 'sender_id': '1077211678670', 'pluginConfig': { 'ios': { 'a

在Android上。当应用程序关闭且我单击通知时,应用程序将打开,但通知不会调用所需的功能。为什么?我尝试了很多东西,但都没用

简化代码:

前端设置:

const cloudSettings: CloudSettings = {
'core': {
    'app_id': '61d7358c'
},
'push': {
    'sender_id': '1077211678670',
    'pluginConfig': {
        'ios': {
            'alert': true,
            'badge': false,
            'sound': true,
            'clearBadge': true
        },
        'android': {
            'iconColor': '#1BB6EB',
            'sound': true,
            'clearBadge': true, 
            'clearNotifications': false,
            'forceShow': true 
        }
    }
}};
订阅偶数:

ngOnInit() { this.push.plugin.on('notification', data => this.notificationEvent(data)); }
功能:

notificationEvent(data) { console.log('data', data) }
后端:

axios({
                method: 'post',
                url: 'https://api.ionic.io/push/notifications',
                headers: {
                    'Content-Type': 'application/json',
                    Authorization: `Bearer ${config.integrations.ionic.token}`
                },
                data
            });
数据:


欢迎来到SO!看看这篇文章:看看你是否可以改进你的问题,使其更有可能被回答。欢迎来到SO!看看这篇文章:看看你是否能改进你的问题,使之更有可能被回答。
{ profile: 'devit1',
  notification:
    { title: 'new entry',
      message: 'new entry',
      payload:
         { type: 1,
           entryId: 2020,
           id: 4191,
           notId: 4191,
           title: 'newEntry',
           message: 'new entry,  },
      ios:
         { title: 'new entry',
           message: 'new entry',
           content_available: 0,
           sound: 'default' },
      android:
         { title: 'new entry',
           message: 'new entry',
           content_available: 0,
           sound: 'default' } 
  },
  tokens: [ 'fZ4_yY:APA91bFYxyT2gsqYvMPfwFYNJVXBwTFkk73-eohDQ_m-f_wfCiJWtUaIazG39' ] }