Looking at the Push API docs, for the Request, you have a ‘payload’ object near the top level, outside the ‘ios’ and ‘android’ configs. And then each of IOS and Android configs have their own ‘payload’ object. From what I read, the ios.payload and android.payload configs ‘override’ the outer config.
The behavior I see (100% reproducible) is that IFF I send a notification request that ONLY has the outer ‘payload’ set, I get a failure from IONIC service saying 'null pointer exception.
If I put my ‘payload’ config/object in both places (i.e. top level, inside ‘ios’ and inside ‘android’) I don’t get that exception, but what I see for android is this:
06-15 23:44:09.169 30171 30288 V PushPlugin: extrasToJSON: {"event":"message","from":"89940107206","message":"sdfsdf","coldstart":true,"foreground":false,"payload":{"payload":{"type":"GENERAL"},"sound":"sound.wav","title":"ste","google.message_id":"0:1497588233390156%e0f6b3faf9fd7ecd","message":"sdfsdf"}}
Why does it have 2 ‘payload’ attributes nested? Strange … {payload: {payload: …}}
What’s going on? Anyone?