Is application running

kalarius

Active Member
Licensed User
Longtime User
hi,

I have install an application on my tablet the name of it is "andoitmap"

I want to write a service that check if that application is running and if not then start it

the questions are
a) How do I discover that the application with this name is running

b) how can I use a command like the shell of VB " shell andoitmap"

c) when I choose from google paly to install a program What is the default folder that instaled?

Kalarakis
Greece
Creta
 

SoyEli

Active Member
Licensed User
Longtime User
This may help:

Sub FindRunningProgram (Package As String)
Dim sb As StringBuilder
sb.Initialize
Phone1.Shell("ps", Null, sb, Null)
Dim m As Matcher
m = Regex.Matcher2("^[^ ]*\s+(\d+) .*" & Package, Regex.MULTILINE, sb.ToString)
If m.Find Then
'Log(Package & " is running")
Return True
Else
'Log(Package & " is NOT running")
Return False
End If
End Sub
 
Upvote 0
Top