Current notification checks are lacking a lot. We must validate all JSON messages to make sure that:
They are valid JSON strings.
They follow the message format we require.
Validate max size 4096 for GCM only notifications.
Validate max size 256 for APN notifications.
Validate the presence of apn data with at least one of alert, badge or sound fields
for APN notifications.
Check list of apn_ids, gcm_ids and remove those that presented errors in the past.
This requires implementation of APN feedback and check of GCM return values.
Current notification checks are lacking a lot. We must validate all JSON messages to make sure that: