Hi,
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 ?
Sorry if I sound too basic.
Thanks.
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 ?
Sorry if I sound too basic.
Thanks.