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

Bundle object Extras is null all the time #116

Open
Cantek opened this issue Mar 24, 2017 · 1 comment
Open

Bundle object Extras is null all the time #116

Cantek opened this issue Mar 24, 2017 · 1 comment

Comments

@Cantek
Copy link

Cantek commented Mar 24, 2017

Hello,

I am trying to figure out if app is being created by clicking on push notification via using the Bundle object which is sent to onCreate function as parameter. Depending on the parameters sent via push message I want to open different views of the application. As you can understand I am using this plugin in a Xamarin forms application to receive push notifications. Notifications are being shown properly and when I click them it opens the app properly. But I could not figure out how to reach the same parameters from inside the opened app to decide what to do in next step.

Let's say push notification Title is Football and text is Barcelona, I want to receive that from inside the app and open directly the football category with Barcelona's details. But I can not receive this data at the moment. What ever I tried I couldn't figure it out.

    protected override void OnCreate(Bundle bundle)
    {
        //bundle.Extras param is always NULL
        base.OnCreate(bundle);

        global::Xamarin.Forms.Forms.Init(this, bundle);

But it is coming as NULL all the time. What should I do to fix that?

And also, if this approach is wrong what can I use instead?

Thanks in Advance

@Cantek Cantek changed the title Bundle object is null all the time Bundle object Extras is null all the time Mar 24, 2017
@rdelrosario
Copy link
Owner

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

No branches or pull requests

2 participants