Try with attached library files (jar and xml). Have not tested it but the two methods should now be public (and not protected). The new lib should show as V1.03 in the B4A IDE.
public void onResume() {
nfcCardReader.enableDispatch();
}
public void onPause() {
nfcCardReader.disableDispatch();
}
ok
after testing the new lib i get this runtime error - on both onResume & onPause
maybe something is not initialized?
or maybe it is about where i call the functions?
i call the onResume in activity_resume (tried to move the call to the end of the part where you initialize all elements - didn't help
the onPause i call in activity_pause
when i roll back to lib 1.01 (sdk 31 - the latest you sent) - all works fine
** Activity (main) Resume **
Error occurred on line: 295 (Main)
java.lang.RuntimeException: Object should first be initialized (List).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.collections.List.Clear(List.java:69)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:777)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:354)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at arkom.nfc.main.afterFirstLayout(main.java:111)
at arkom.nfc.main.access$000(main.java:17)
at arkom.nfc.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
java.lang.Exception: java.lang.RuntimeException: Object should first be initialized (List).
*** Service (httputils2service) Create ***