Android Question An issue of app self update for help


Active Member
Licensed User
The code is from
The normal update process is ok。
Sub Service_Start (StartingIntent As Intent)
    If StartingIntent.Action = "android.intent.action.MY_PACKAGE_REPLACED" Then
        LogColor ("App self updated OK",Colors.Yellow)
    End If
    Service.StopAutomaticForeground 'Call this when the background task completes (if there is one)
End Sub
Start package replaced intent, after confirm and updating package, stop process and restart app.
in this case , it works correctlly

After I cancelled the intent of package updated , the app would restart but process did not stop, two instances of app were running.

how to stop restarting the app after I cancelled the intent?