I have a small application which fetches data from an SQLLITE database.
It is an Activity Based Application.
Key declarations in the 'Starter' file :
1) Sub Process_Globals:
1.1) Public variable to hold the DbName in Process_Globals
1.2) A User-Defined-Fields Data Type
2) Other routines in the Starter File:
Sub Service_Create
SafeDirectory = RTP.GetSafeDirDefaultExternal("")
If File.Exists(SafeDirectory, DBName) = False Then
Wait For (File.CopyAsync(File.DirAssets, DBName, SafeDirectory, DBName)) Complete (Success As Boolean) 'File.DirInternal
ToastMessageShow($"DB Copied = ${Success}"$, False)
' Log("Success: " & Success)
End If
ConnectToTheDatabase
Wait For SQLite_Ready (Success As Boolean)
End Sub
Sub Service_Start (StartingIntent As Intent)
Service.StopAutomaticForeground 'Starter service can start in the foreground state in some edge cases.
End Sub
Sub Service_TaskRemoved
'This event will be raised when the user removes the app from the recent apps list.
End Sub
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub Service_Destroy
End Sub
Public Sub ConnectToTheDatabase
SQL.Initialize(SafeDirectory, DBName, False)
End Sub
3) My 'Activity' based application works fine presently.
My doubt:
I wish to convert the Activity based application into a B4XPage application.
So where should I place all the above declaration routines when we create a B4XPage , the
Starter file is not created by default .
So what are the eqvt. subroutines in a B4XPage variant ?
If you create a new B4XPages project with the B4XPages template, there is no Starter module.Wrong., see post #10.
In the B4X Booklets, in the source code of the B4X SQLite database booklet, there does exist a B4XPages example of the SQLiteLight2 project called B4XPages_SQLiteLight2.
No.
Only the code concerning SQLite or any other file management code.
You can leave the Starter Service module in your project if you want.
You can, but it will not be cross-platform.
If you create a new B4XPages project with the B4XPages template, there is no Starter module.
In the B4X Booklets, in the source code of the B4X SQLite database booklet, there does exist a B4XPages example of the SQLiteLight2 project called B4XPages_SQLiteLight2.