B4A Question How to know if a service is running using OS Library? - agraham (first post)    May 20, 2021   (1 reaction) This is a very old library that uses non-recommended API calls. It was a bit dodgy in its day and is now well out of date.
getRunningServices and RunningServiceInfo were deprecated in API level 26 and are no longer available
getRunningTasks and RunningTaskInfo were deprecated in API level 21 and B4A Question getRunningTasks doesn't work in Android L - thedesolatesoul (first post)    Jan 21, 2015   (1 reaction) It is deprecated. There is no alternative. B4A Question get package name on android 5 - sonicmayne (first post)    Jul 14, 2015   (1 reaction) In Android L, Google has disabled getRunningTasks. Now it can only return own apps task and the home launcher.
There are a few workarounds:
http://stackoverflow.-doesnt-work-in-android-l
http://stackoverflow.com/questions/26714285/is-there-an-alternative-for-getrunningtask-api/27304318#27304318 B4A Question Getting a List of Running Apps - treehousefrog (first post)    May 11, 2015 After doing some more research, apparently 'getRunningTasks' is depreciated in Lollipop :-S But there must be a way to do it as other task killer apps still work...
Mysterious! If anyone has any ideas, that would be much appreciated! B4A Question get the list of running applications - Erel (first post)    Nov 24, 2020 As discussed in many threads: https://www.b4x./?query=getRunningTasks it will not work: https://developer.android.#getRunningTasks(int) B4A Question Check if a app is running - SinaDeveloper    Mar 20, 2023 Hello In my app I need to check if another app is open or not I can get the list of running apps on lower versions of Android: Dim AM As ActivityManager Dim Info() As RunningTaskInfo = AM.GetRunningTasks For i = 0 To Info.Length - 1 Log(Info(i).GetPackageName) Next But this c B4A Library OS metrics: MSOS lib and OSStats and GetForegroundApp - thedesolatesoul (first post)    Mar 21, 2015   (2 reactions) Yes they are deprecated: http://developer.android..html#getRecentTasks(int, int) http://developer.android..html#getRunningTasks(int) I would need to fix the lib. Try the one attached. B4A Question List of Running Applications and Package Names - warwound (first post)    Oct 24, 2015   (1 reaction) task_info is an instance of a RunningTaskInfo object is it?
Where did you get the instance from - from the ActivityManager GetRunningTasks method?
Can you post the code you're using? B4A Question Stop audio record when whatsapp call - Erel (first post)    Nov 03, 2015   (1 reaction) This is indeed problematic. You can use this code to find the current running app: Sub CurrentRunningActivity As String Try Dim jo As JavaObject jo.InitializeContext jo = jo.RunMethod("getSystemService", Array("activity")) Return jo.RunMethodJO("getRunningTasks", Array(1)).R B4A Library B4ActivityManager: detect bots using your app - Alejandro Moyano    May 15, 2022   (10 reactions) Hi I needed to detect bots to block and found that can be handled by the activity manager using the functions isRunningInUserTestHarness and isUserAMonkey then I developed a wrapper around. The following functions are implemented: isRunningInUserTestHarness: Returns "true" If the device Is runnin Page: 1   2   3   4   5   6   7   Powered by ColBERT |