Skip to content
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

Extending ParsePushBroadcastReceiver #152

Open
ngocphamm opened this issue Jan 12, 2016 · 3 comments
Open

Extending ParsePushBroadcastReceiver #152

ngocphamm opened this issue Jan 12, 2016 · 3 comments
Labels

Comments

@ngocphamm
Copy link

Hi,

I'm trying to extend the ParsePushBroadcastReceiver so I can have some custom data parsed from the notification Intent Extras.

According to this, I should be able to extend the class. However, in C#, the class is public sealed. How am I supposed to do the subclass here, then?

I apologize if this appears to be a basic programming question, and thanks in advance.

@richardjrossiii
Copy link
Contributor

Yep, this is definitely a bug, considering our official .NET guide says you should be able to subclass.

I'll get a fix out soon.

https://parse.com/tutorials/android-push-notifications

@ngocphamm
Copy link
Author

Oh nice. Thanks for your response @richardjrossiii. Looking forward to an update!

richardjrossiii added a commit that referenced this issue Jan 12, 2016
This is required to do custom push notification handling as outlined in our official guide:
https://parse.com/tutorials/android-push-notifications.

Fixes #152.
@ngocphamm
Copy link
Author

I couldn't wait for the fix to come out, so I get this project (with your fix to this issue) and build the dll myself. However, I realize that even that wouldn't help me anyway.

This is the class in Java
https://github.com/ParsePlatform/Parse-SDK-Android/blob/master/Parse%2Fsrc%2Fmain%2Fjava%2Fcom%2Fparse%2FParsePushBroadcastReceiver.java

And this is the one in .NET
https://github.com/ParsePlatform/Parse-SDK-dotNET/blob/master/Parse%2FPublic%2FAndroid%2FParsePushBroadcastReceiver.cs

The thing is the .NET class doesn't have any of the methods like in Java to extend from. It calls the ParsePushService, and probably handle the receipt of notification over there, but I don't really know further how to deal with that.

Can you please confirm that there's a way to customize the way remote notification is received on Android, with Xamarin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants