I’m building a ionic app and it already receives pushes notifications. My problem is modify this notifications. I send a new param in the json of the push but i dont know how handle it.
I have found the file GCMIntentService.java. This file contains the logic to create de push in android systems. It handle the param “msgcnt” that is sended from mi php push server. I have changed this file, but when I run “ionic build” this change is not applied into the apk file.
¿how must I do the changes of the notification builders, and how must i compile/incluide it into the apk file?
Thanks on advance.
So I had the same requirement - I needed to modify that file for some changes to GCM. I did it the “low tech” way. I have a modified copy of that file in a project folder and inside hooks/before_prepare I created a script that copies the file into the right place
You can see my approach here https://github.com/pliablepixels/zmNinja/blob/master/hooks/before_prepare/01_pp_hacks.sh#L11
Note: You should ideally write this as a nodejs script so its completely portable, I wrote it as a shell script because I was more familiar with it.
Your are my hero!..Paths are not as exact as mines. My paths are:
Now, i modified target and changes are compiled and included on the apk.
Thanks, thanks, thanks.