Hi Udg i tried your Lib with the 1.26 example script but now i get this strange error
java.lang.NoClassDefFoundError: anywheresoftware.b4a.http.HttpClientWrapper
at anywheresoftware.b4a.samples.httputils2.httputils2service._process_globals(httputils2service.java:137)
at b4a.example.appupdate.main.initializeProcessGlobals(main.java:317)
at b4a.example.appupdate.main.afterFirstLayout(main.java:96)
at b4a.example.appupdate.main.access$100(main.java:17)
at b4a.example.appupdate.main$WaitForLayout.run(main.java:78)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:604)
at dalvik.system.NativeStart.main(Native Method)
This is the code from your zip with my apk and info file just to test out
#Region Project Attributes
#ApplicationLabel: AppUpdating Example
#VersionCode: 1
#VersionName: 1.01
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim apkupdt As cl_appupdate
Private EditText1 As EditText
Private btnCurVer As Button
Private btnPackage As Button
Private btnWebVer As Button
Private btnCompare As Button
Private btnDwnld As Button
Private btnInstall As Button
Private ButtonUpdate As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
EditText1.Color=Colors.White
EditText1.TextColor=Colors.Black
EditText1.Text="Step by Step library usage"&CRLF
If FirstTime Then
apkupdt.Initialize(Me,"update")
apkupdt.Verbose = True
End If
apkupdt.PackageName = "b4a.example.appupdate"
apkupdt.NewVerTxt = "https://archive.org/download/kraakie_gmail_Test/version.info"
apkupdt.NewVerApk = "https://archive.org/download/kraakie_gmail_Test/C64.apk"
apkupdt.setCredentials("test","test")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnPackage_Click
EditText1.Text=EditText1.Text&"Package name: " & apkupdt.PackageName&CRLF
End Sub
Sub btnCurVer_Click
apkupdt.ReadCurVN
End Sub
Sub btnWebVer_Click
apkupdt.ReadWebVN
End Sub
Sub btnCompare_Click
If apkupdt.CurVN < apkupdt.WebVN Then
EditText1.Text=EditText1.Text&"Newer version available"&CRLF
Else
EditText1.Text=EditText1.Text&"No newer version available"&CRLF
End If
End Sub
Sub btnDwnld_Click
apkupdt.DownloadApk
End Sub
Sub btnInstall_Click
apkupdt.InstallApk
End Sub
Sub ButtonUpdate_Click
EditText1.Text="A single sub call does it all"&CRLF
apkupdt.SetAndStartSplashScreen(Activity,LoadBitmap(File.DirAssets, "updating.jpg"))
apkupdt.UpdateApk
End Sub
Sub update_UpdateComplete
apkupdt.StopSplashScreen
Select apkupdt.Status
Case apkupdt.OK_CURVER
EditText1.Text=EditText1.Text&"Running apk version: " & apkupdt.CurVN&CRLF
Case apkupdt.OK_WEBVER
EditText1.Text=EditText1.Text&"Webserver apk version: " & apkupdt.WebVN&CRLF
EditText1.Text=EditText1.Text&"Optional Change Log data: " & apkupdt.WebChangeLog&CRLF
Case apkupdt.OK_NEWERAPK
EditText1.Text=EditText1.Text&"Newer version available"&CRLF
Case apkupdt.NO_NEWERAPK
EditText1.Text=EditText1.Text&"No newer version available"&CRLF
Case apkupdt.OK_DOWNLOAD
EditText1.Text=EditText1.Text&"Newer version downloaded"&CRLF
Case apkupdt.OK_INSTALL
EditText1.Text=EditText1.Text&"User asked to install newer version"&CRLF
Case Else
EditText1.Text=EditText1.Text&"Status: "&apkupdt.Status&CRLF
End Select
End Sub