Android Question AppUpdating Lib (2.02) - URL problems [Solved]

Similar threads

B4A Tutorial [B4X] Smart String Literal
B4J Tutorial [B4X] Additional libraries folder
B4A Tutorial CharSequence / CSBuilder Tutorial
B4A Tutorial Google Maps
B4A Tutorial AndroidX SDK

stu14t

Active Member
Licensed User
I'm looking for some guidance as to where I'm going wrong.

I can get the example code to work fine but when I substitute my URL for the location of the inf file on my own web server, it does not read the file for some reason. I've kept the same file format exactly and tried using different web servers.

I have implemented the code in my own app and it only works with the original example URL for the .inf file, not my own URL.

I've tried both http and https

What am I doing wrong?
 

stu14t

Active Member
Licensed User
It's exactly the same code as in the example here. The only thing I've changed is the URL to the AppUpdateExample2.inf file that I've put on my own server

B4X:
'Do not forget to load the layout file created with the visual designer. For example:
            If FirstTime Then
                apkupdt.Initialize(Me,"update")            'initializes the class
                apkupdt.Verbose = True                  'this one affects the verbosity of the logs
            End If
            'ALWAYS NEEDED - this is your app's package name (see "Project/BuilConfigurations/Package")
            apkupdt.PackageName = "***.data_******"
            'ALWAYS NEEDED - this is the complete path to the info text file holding the newer version number
            apkupdt.NewVerTxt = "http://www.*******.co.uk/app_update/AppUpdateExample2.inf"
            'ALWAYS NEEDED - this is the complete path to your newer apk
            apkupdt.NewVerApk = "https://www.********.co.uk/app_update/*******.apk"
            'OPTIONAL - Set credentials to access a protected folder. Not needed for this example
            'apkupdt.setCredentials("test","test")
           
                   
            apkupdt.ReadCurVN
            apkupdt.ReadWebVN
If I change the URL in the
B4X:
 apkupdt.NewVerTxt =
line back to the original URL supplie in the example everything works fine

I've tried HTTP and HTTPS and it makes no difference
 

udg

Expert
Licensed User
A simple check is to try the exact string in apkupdt.NewVerTXT from your browser.
If you find that it doesn't work there too, a good investigation point is the capitalization of path/file name.
 

stu14t

Active Member
Licensed User
A simple check is to try the exact string in apkupdt.NewVerTXT from your browser.
If you find that it doesn't work there too, a good investigation point is the capitalization of path/file name.
Just a guess, but it maybe an issue with mime types on your server, try renaming your file extension from .inf to .txt
Many thanks, I will try both of these and report back
 

stu14t

Active Member
Licensed User
This fixed it:

A simple check is to try the exact string in apkupdt.NewVerTXT from your browser.
If you find that it doesn't work there too, a good investigation point is the capitalization of path/file name.
I capitalise the both path and filename and it sorted it out. Something so simple. Many thanks @udg
 
Top