Reputation: 5642
Lets assume there exists the following:
Is it possible for Library C to be registered to receive push notifications? In other words, I'd like App A and App B to use the dependency of Library C. I'd like for App A and App B to both receive push notifications when the Server pushes them to Library C. I was wondering if this is possible. If so, how?
The reason I ask is because it seems when registering an App with GCM, it must be registered/tied to an "App package name". I was wondering if this works with a "Library package".
Upvotes: 2
Views: 1169
Reputation: 43334
Yes that is possible, but it requires some configuration in the app that uses the library.
If you want your library to receive push messages without the app knowing it, that is however not possible.
I'd like for App A and App B to both receive push notifications when the Server pushes them to Library C
A server does not send a push to library C, it sends a push to a registration ID (or token). Google doesn't care whether that is tied to an "app" or a "library".
Also Receive Push Notifications into library project might have useful info for you.
Upvotes: 5