android - How to intercept third party library gcm -


my app implements gcm. using third party library implements gcm. when message comes library, there way intercept (without damaging app)?

one idea considering create broadcastreceiver somehow knows when gcm comes library , receives way (i don't care if library gets notified well; want too).

btw right library not receiving gcm @ because have gcm. but, again, in case want app able library's gcm regardless whether library gets too

about gcm connection server, in implementing gcm server you'll need decide gcm connection server protocol(s) want use enable app server interact gcm connection servers. note if want use upstream messaging client applications, must use xmpp.

it mentioned 1 of 2 components in server side of google cloud messaging that:

an application server must implement in environment. application server sends data client app via chosen gcm connection server, using appropriate xmpp or http protocol.

additionaly, regarding intercepting gcm message use of broadcastreceiver, noted in implementing gcm client that:

if have relatively simple app doesn't require service, can intercept gcm message in regular broadcastreceiver , processing there. once intent gcm passes broadcast receiver's onreceive() method, you.

more information , samples given in documentations. hope help. happy coding!


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo