Hi,
I have a library (Activity kind), that does not have received an .Initialize from my B4A source code.
Hoever I pretend to call a sub (like raising an event) to the activity that is on screen.
I'm getting an error when call
telling that "ba" is null.
Error message:
How can I use ba from an external class that is automatically initialized not by me but from an external SDK?
How to force BA to evoke the current activity?
I have a library (Activity kind), that does not have received an .Initialize from my B4A source code.
Hoever I pretend to call a sub (like raising an event) to the activity that is on screen.
I'm getting an error when call
B4X:
if (BA.subExists( "pushy_msg")) {
BA.raiseEventFromUI(this, "pushy_msg", notificationText);
}
Error message:
B4X:
{message=Ola!!!!}
Invoking push receiver via reflection: com.teste.PushReceiver2
MSG:Ola!!!!
Invoking push receiver via reflection failed
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at me.pushy.sdk.model.PushyBroadcastReceiver.execute(PushyBroadcastReceiver.java:22)
at me.pushy.sdk.util.PushyBroadcastManager.sendBroadcast(PushyBroadcastManager.java:158)
at me.pushy.sdk.util.PushyBroadcastManager.publishNotification(PushyBroadcastManager.java:99)
at me.pushy.sdk.util.PushyMqttConnection.messageArrived(PushyMqttConnection.java:251)
at me.pushy.sdk.lib.paho.internal.CommsCallback.deliverMessage(CommsCallback.java:475)
at me.pushy.sdk.lib.paho.internal.CommsCallback.handleMessage(CommsCallback.java:379)
at me.pushy.sdk.lib.paho.internal.CommsCallback.run(CommsCallback.java:183)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean anywheresoftware.b4a.BA.subExists(java.lang.String)' on a null object reference
at com.teste.PushReceiver2.onReceive(PushReceiver2.java:58)
... 9 more
How can I use ba from an external class that is automatically initialized not by me but from an external SDK?
How to force BA to evoke the current activity?