Skip to content

Access in Native Code #26

@anwersolangi

Description

@anwersolangi

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions