Android Question why app unable to unstall completely

Makumbi

Well-Known Member
Licensed User
Good evening members aim currently faced with two problems when i install my app on my phone if i try to uninstall it and install a newer version the old version seem to be retained even if i got to setting and clear both catch and data what could be the problems how can i make it in such a way that when i un install all the files and folders related to the app are uninstalled and cleared from the phone.

2. Why is it that when ever i add new tables in my sqlite database these tables are not created automatically even when i click on update app on the google playstore please find codes from my starter page



B4X:
#Region  Service Attributes
    #StartAtBoot: False
    #ExcludeFromLibrary: True
    
#End Region

Sub Process_Globals
    Public SQL1 As SQL
    Dim SQL1 As SQL
    Dim cursor1 As Cursor
    Dim cursor As Cursor
    Private nid As Int = 1
    Private serializator As B4XSerializator
    Dim SQLDataBasePath = File.DirInternal As String
    Dim SQLDateBaseName = "studentdbmk.sql" As String
    'Dim SQLTabelName = "persons" As String
    Public CurrentIndex As Int        'index of the current entry
    Public RowNumber As Int                'number of rows
    Public rp As RuntimePermissions
    Public IDList As List        'list containing the IDs of the database
    'we need it because the IDs can be different from the list indexes
    'if we delete an entry its ID is lost
    Dim cursor As Cursor
    'Variables for Edit
    'the Edit Activity has two modes  "Add"  and "Edit"
    Public EditMode As String

    Type StudentData (Studentnamed As String, LblCity As String,Classr As String, Stream As String, Subject As String, Termr As String,City As String, Latitude As Float, Longitude As Float, Altitude As String,Totalmarks As String,English As String,Maths As String,Science As String,Sst As String,ire As String,Lit1 As String,Lit2 As String,Totalgrade As String,Division As String,iregrade As String,sciencegrade As String,sstgrade As String,mathsgrade As String,engrade As String)

    'Variables for Filter
    'variable for the filter query,
    'defined in the btnFilter_Click routine
    'and will be used In the DBWebView ShowTable routine
    Public FilterQuery As String
    
    'flag for the filter active or inactive
    Public flagFilterActive As Boolean
    
    'Boolean operator used in the filter
    'can be OR or AND
    Public FilterBooleanOperator As String
    
    'Variables used to hold the selected indexes of the Spinners
    Public SelectedFirstName = 0 As Int
    Public SelectedLastName = 0 As Int
    Public SelectedCity = 0 As Int
    Dim strTitle As String
    Dim strBody As String
    
End Sub
Private Sub CreateMessage(Body As String) As Byte()
    Dim m As Message
    m.Initialize
    m.Body = Body
    m.From = "currentName"
    Return serializator.ConvertObjectToBytes(m)
End Sub
Public Sub SendMessage(Body As String)
    CreateMessage(Body)
    'client.Publish2("all", CreateMessage(Body), 0, False)

End Sub
Sub Service_Create
    'initialize the variables
    CurrentIndex = -1
    RowNumber = 0
    EditMode = "Add"
    FilterQuery = ""
    flagFilterActive = False
    FilterBooleanOperator = "OR "
    Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_NEVER
    'File.Delete(File.DirInternal, "studentdbm.sql") ' only for testing, removes the database
    'check if the database already exists
    If File.Exists(SQLDataBasePath, SQLDateBaseName) = False Then
        'copy the default DB
        File.Copy(File.DirAssets, SQLDateBaseName, SQLDataBasePath, SQLDateBaseName)
        'if not, initialize it
        SQL1.Initialize(SQLDataBasePath, SQLDateBaseName, True)
        'and create it
        'CreateDataBase
        SQLInit
        
    
        

        CallSubDelayed(Firebasemessaging, "SubscribeToTopics")
    
    Else
    
    
        SQL1.Initialize(SQLDataBasePath, SQLDateBaseName, True)
        'SQLInit
        CallSubDelayed(Firebasemessaging, "SubscribeToTopics")

    End If
End Sub
 

kisoft

Well-Known Member
Licensed User
Longtime User
You must uninstall the application from the settings page. Removing the icon from the screen does not uninstall the application. You can also change the package name.
 
Upvote 0

Makumbi

Well-Known Member
Licensed User
You must uninstall the application from the settings page. Removing the icon from the screen does not uninstall the application. You can also change the package name.
i have also uninstall the application using the settings page but still the problem appears thanks
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…