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

Access in Native Code #26

Open
anwersolangi opened this issue Jun 9, 2021 · 1 comment
Open

Access in Native Code #26

anwersolangi opened this issue Jun 9, 2021 · 1 comment

Comments

@anwersolangi
Copy link

Hello, I am trying to access the module in the Native side of Java, as I am using OneSignal and there is no background listener in Onesignal so i extended the Notification, and i am able to show the displayIncoming method for the first time to the user, even if the device is in locked mode, but after the dismiss method is called or any other method of the decline/answer is called, it throw an error of "Attempt to invoke virtual method 'boolean com.facebook.react.bridge.ReactApplicationContext.hasCurrentActivity()' on a null object reference"
Any solution for this, I want to use the native method of displayIncoming only to show the UI, and use bridging to catch the answer/declined method only or dismiss() method?
P.S: I am not expert in Java & Android yet. any help is appreciated, Thanks!

@appdeveloperhw
Copy link

Hi @anwersolangi did you found the solution for this? I am using one signal and facing the same issue.

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