-
-
Notifications
You must be signed in to change notification settings - Fork 735
Allow the GcmBroadcastReceiver to be subclassed #638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… its functionnality
Codecov Report
@@ Coverage Diff @@
## master #638 +/- ##
=========================================
Coverage 52.86% 52.86%
Complexity 1676 1676
=========================================
Files 131 131
Lines 10146 10146
Branches 1408 1408
=========================================
Hits 5364 5364
Misses 4339 4339
Partials 443 443
Continue to review full report at Codecov.
|
Just curious, how are you going to get the gcm receiver instance to call |
In the constructor of a class extending it. (protected method). You call add for each other receiver. But I would prefer just remove the One or the other is good for me. |
I would also rather remove the |
|
I think we have it.. ? https://github.com/parse-community/Parse-SDK-Android/blob/master/Parse/build.gradle#L47 |
Ahh, I stand corrected. +1 for |
Anyway... it doesn't work because of that The class declared needs to be GcmBroadcastReceiver.class, not only an instanceOf. Do anybody know why there is so much validation around that GCM receiver? We are using mixpanel push system and we want also to use parse for differents campaign. |
Speaking of which, does anyone have bandwidth to consider ripping out GCMService and putting them into a separate repo? Sort of like ParseGCM like we have for Parse Facebook. This way people can start using Firebase GCM v4 but this library would provide all the necessary setup to make things work with Parse (i.e. InstandID service) See: #445 |
@rogerhu Do you think it needs to be its own repo? Maybe it would be better to just have it as another module in this repo? (which could be deployed as its own dependency) |
I think the challenge is that when you deploy via Gradle, it will attempt to deploy across all modules unless you explicitly specify it. If it makes things easier to get started, we can do it until we're ready to release.. |
rebase |
one more rebase needed |
On Apr 27, 2017 1:04 PM, "Roger Hu" <[email protected]> wrote:
rebase
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#638 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AZO67nOTMEL1WymJC_cGyphdkdS5qD40ks5r0MqCgaJpZM4NAsK0>
.
|
The label |
You can only define one Broadcast Receiver to act as a GCM receiver.
In our case, we want to receive pushes from Parse and another provider. So I was going to write a Proxy that wrap both receivers.
But the Parse SDK prevent that by doing a strong validation of the Manifest. (https://github.com/parse-community/Parse-SDK-Android/blob/master/Parse/src/main/java/com/parse/ManifestInfo.java#L446-L448)
The GCM receiver defined need to be explicitly an instance of GcmBroadcastReceiver.
And that class can't be extended as the onReceive method is final.
(If the validations do not pass, the PushType is None and the registration will not happen) (https://github.com/parse-community/Parse-SDK-Android/blob/master/Parse/src/main/java/com/parse/ManifestInfo.java#L212-L214)
The current PR is a proposition.
But there are many solutions to my problem.