On your Android or iPhone, if you launch Chrome or Safari then search for "www.b4x.com" then find "Add to Home Screen" and follow the breadcrumbs you end up with the websites bookmark as a nice little icon on the home screen with the B4X logo in it. Tap it and you are immediately at the website.
I want to do this for an ABMaterial webapp.
I have tried the following:
Step 1
Installed ABMMini on my D: drive - see:
https://www.b4x.com/android/forum/t...-absolute-beginners-update-2022-09-08.117237/
I ended up with a folder [D:\ABMMini] containing:
Library folder
Template folder
LICENSE.TXT
README.txt
and these additions to my B4J [Additional Libraries] folder:
ABMaterial.jar
...
thumbnailator-0.4.8.jar
Step 2
I used 7-Zip to open [...\Additional Libraries\ABMServer.b4xlib] then copied the contents (excluding manifest.txt) to [D:\ABMMini\Template]
I launched the B4J project [D:\ABMMini\Template\Template.b4j] then:
unchecked the Library ABMServer.
via [Project] > [Add Existing Modules] I added the modules I unzipped from ABMServer.b4xlib
Step 3
I modified ABMApplication module as follows:
Step 4
I create a file [icon128x128.png] and save it in [D:\ABMMini\Template\Objects\www\template\images]
Step 5
I then run the Template project in Debug mode.
In either mobile browser, when I use URL [http://192.168.???.???:51042/Template] then find "Add to Home Screen" and follow the breadcrumbs the [icon128x128.png] is not shown in the resulting home screen icon.
Can anyone tell me what I am doing wrong?
I want to do this for an ABMaterial webapp.
I have tried the following:
Step 1
Installed ABMMini on my D: drive - see:
https://www.b4x.com/android/forum/t...-absolute-beginners-update-2022-09-08.117237/
I ended up with a folder [D:\ABMMini] containing:
Library folder
Template folder
LICENSE.TXT
README.txt
and these additions to my B4J [Additional Libraries] folder:
ABMaterial.jar
...
thumbnailator-0.4.8.jar
Step 2
I used 7-Zip to open [...\Additional Libraries\ABMServer.b4xlib] then copied the contents (excluding manifest.txt) to [D:\ABMMini\Template]
I launched the B4J project [D:\ABMMini\Template\Template.b4j] then:
unchecked the Library ABMServer.
via [Project] > [Add Existing Modules] I added the modules I unzipped from ABMServer.b4xlib
Step 3
I modified ABMApplication module as follows:
B4X:
Public Sub Initialize()
Pages.Initialize
PageNeedsUpload.Initialize
ABM.AppVersion = Main.server.AppVersion
ABM.AppPublishedStartURL = Main.server.AppPublishedStartURL
Dim DonatorKey As String = Main.Server.DonatorKey
InitialPage = Main.Server.StartPage
' add your icons
' ABM.AddAppleTouchIcon("", "")
ABM.AddAppleTouchIcon("icon128x128.png", "128x128") '<<<<<<< my addition
' ABM.AddMSTileIcon("", "")
' ABM.AddFavorityIcon("", "")
#If RELEASE
'ABM.ActivateUseCDN(DonatorKey, "https://cdn.jsdelivr.net/gh/RealAlwaysbusy/[email protected]/")
'ABM.PreloadAllJavascriptAndCSSFiles=True ' NEW
ABM.ActivateGZip(DonatorKey, 1000) ' NEW
Dim folders As List ' NEW
folders.Initialize
folders.Add(File.DirApp & "/www/" & Main.server.AppName & "/images")
ABM.ActivatePNGOptimize(DonatorKey, folders, False , 9, False, True )
#End If
' build the local structure IMPORTANT!
BuildPage
End Sub
Step 4
I create a file [icon128x128.png] and save it in [D:\ABMMini\Template\Objects\www\template\images]
Step 5
I then run the Template project in Debug mode.
In either mobile browser, when I use URL [http://192.168.???.???:51042/Template] then find "Add to Home Screen" and follow the breadcrumbs the [icon128x128.png] is not shown in the resulting home screen icon.
Can anyone tell me what I am doing wrong?
Last edited: