If I want to know if a service (OpenVPN) is running on the smartphone, which instruction should I use? And how? I tried with
Dim l1,l2,l3 As List
l1.Initialize
l2.Initialize
l3.Initialize
OS.RunningServiceInfo(10,l1,l2,l3)
'and
OS.RunningAppProcessInfo(l1,l2,l3)
'and
l1=OS.getRunningTasks(10)
'with
Log(L1)
Log(L2)
Log(L3)
but it doesn't return anything to let me know that service is running
i get
b4a.example : 25328
(ArrayList) [b4a.example]
(ArrayList) [25328]
(ArrayList) [b4a.example: 25328]
b4a.example : 25328
(ArrayList) [b4a.example]
(ArrayList) [25328]
(ArrayList) [b4a.example: 25328]
with
l1=OS.getRunningTasks(10)
For Each s As String In l1
Log(s)
Next
i get
TaskInfo{userId=0 stackId=427 taskId=15749 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=b4a.example/.main } baseActivity=ComponentInfo{b4a.example/b4a.example.main} topActivity=ComponentInfo{b4a.example/b4a.example.main} origActivity=null realActivity=ComponentInfo{b4a.example/b4a.example.main} numActivities=1 lastActiveTime=837425480 supportsSplitScreenMultiWindow=true resizeMode=1
TaskInfo{userId=0 stackId=0 taskId=1 displayId=0 isRunning=true baseIntent=Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000300 cmp=com.huawei.android.launcher/.unihome.UniHomeLauncher } baseActivity=ComponentInfo{com.huawei.android.launcher/com.huawei.android.launcher.unihome.UniHomeLauncher} topActivity=ComponentInfo{com.huawei.android.launcher/com.huawei.android.launcher.unihome.UniHomeLauncher} origActivity=null realActivity=ComponentInfo{com.huawei.android.launcher/com.huawei.android.launcher.unihome.UniHomeLauncher} numActivities=1 lastActiveTime=837417131 supportsSplitScreenMultiWindow=true resizeMode=2