Hi,
my App has to offer the possibility of interrupting a FTP Upload. So i used this code:
This works well until i tried to use SSLExplicit. This results in an error in the Log:
How can i abort the running FTP-Transmission over SSL?
Thanks.
my App has to offer the possibility of interrupting a FTP Upload. So i used this code:
B4X:
If Msgbox2("Do you want to cancel the Upload?", "Cancel Upload?", "OK", "Cancel", "", Null) = DialogResponse.POSITIVE Then
FTP.CloseNow
FTP_CommandCompleted("", False, 0, "")
Dim FTP As FTP
End If
android.os.NetworkOnMainThreadException
at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1128)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.close(OpenSSLSocketImpl.java:926)
at org.apache.commons.net.SocketClient.closeQuietly(SocketClient.java:309)
at org.apache.commons.net.SocketClient.disconnect(SocketClient.java:298)
at org.apache.commons.net.ftp.FTP.disconnect(FTP.java:434)
at org.apache.commons.net.ftp.FTPClient.disconnect(FTPClient.java:843)
at anywheresoftware.b4a.net.FTPWrapper.CloseNow(FTPWrapper.java:434)
at bfw_next.easy.main._ivcancel_click(main.java:1115)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:162)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:158)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:66)
at android.view.View.performClick(View.java:4171)
at android.view.View$PerformClick.run(View.java:17097)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4881)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:808)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
at dalvik.system.NativeStart.main(Native Method)
android.os.NetworkOnMainThreadException
How can i abort the running FTP-Transmission over SSL?
Thanks.