Greetings,
This example coding is from the community search for Msgbox2Async. When I run an app with the code inserted, the app crashes with a null pointer exception.
Can you tell me what the example coding I found is missing?
Thanks.
This example coding is from the community search for Msgbox2Async. When I run an app with the code inserted, the app crashes with a null pointer exception.
Can you tell me what the example coding I found is missing?
Thanks.
This code results in a NoPointerException:
Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null, False)
Wait For Msgbox_Result (Result As Int)
If Result = DialogResponse.POSITIVE Then
'...
End If
servicemodule$ResumableSub_Service_Createresume (java line: 594)
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.ref.WeakReference.get()' on a null object reference
at anywheresoftware.b4a.keywords.Common.Msgbox2Async(Common.java:486)
at b4a.example.servicemodule$ResumableSub_Service_Create.resume(servicemodule.java:594)
at b4a.example.servicemodule._service_create(servicemodule.java:534)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:213)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at b4a.example.servicemodule.onCreate(servicemodule.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:4577)
at android.app.ActivityThread.access$1700(ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2137)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8425)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)