Skip to content

Android - Xiaomi - On user pushed notification app is not opening version 3.0.1 #497

@kabouras33

Description

@kabouras33

What happened?

I was using version 2.x.x and everything worked fine i migrated to version 3.0.1 follwing the migration guide.I can receive notifications but when pressed app is not opening.Strange but the toogle messages on onNotificationOpened appear

`void Start()
{

    OneSignal.Default.Initialize("xxxx-xxxx-xxxx-xxxx");
    OneSignal.Default.NotificationOpened += onNotificationOpened;
    OneSignal.Default.SetLaunchURLsInApp(true);
    OneSignal.Default.PromptForPushNotificationsWithUserResponse();
   }


private void onNotificationOpened(NotificationOpenedResult result)
{
    SceneManager.LoadScene("home");
    ToastHelper.ShowToast("hello");
    ToastHelper.ShowToast(result.notification.ToString());
    ToastHelper.ShowToast(result.action.ToString());
    
}

 private void OneSignalPromptForPushNotificationsReponse(bool accepted)
{
    
}`

Steps to reproduce?

install onesignalexample add my app id and i can accept notifications but it doesnt redirect to my app

What did you expect to happen?

redirect to my app after push the notification

Unity version

2020.3.30

OneSignal Unity SDK version

3.0.1

Platform

Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions