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

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

Open
1 task done
kabouras33 opened this issue May 4, 2022 · 2 comments
Open
1 task done

Comments

@kabouras33
Copy link

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
@kabouras33
Copy link
Author

Ok thats very odd,i was trying on the same device i used before, xiaomi, and i noticed that i have to give manual permission to Display pop-up windows while running in the backround ,to work.....?????any ideas

@jkasten2
Copy link
Member

jkasten2 commented May 5, 2022

@kabouras33 Thanks for reporting, this is a Xiaomi specific issue we are tracking in OneSignal/OneSignal-Android-SDK#1494.

@jkasten2 jkasten2 changed the title On user pushed notification app is not opening version 3.0.1 Android - Xiaomi - On user pushed notification app is not opening version 3.0.1 May 6, 2022
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