Hey guys,
So I used to use the following method to get a list of running apps with their images:
And it worked fine. Suddenly though it's stopped working and I just get a blank list. It *seems* to be since upgrading to Lollipop. I've tried to fix it with no luck. Could anyone please give me a clue as to what the issue is/how to solve it? Thanks a ton in advance!
So I used to use the following method to get a list of running apps with their images:
B4X:
Dim packman1 As PackageManager
Dim whichapp As String
Dim o As OperatingSystem
Dim tasks As List = o.getRecentTasks(20, 0)
For Each task As Object In tasks
Dim r As Reflector
r.Target = task
Dim bi As Object = r.GetField("baseIntent")
If bi <> Null Then
r.Target = bi
r.Target = r.RunMethod("getComponent")
whichapp = r.RunMethod("getPackageName")
ToastMessageShow(whichapp, True)
End If
If whichapp.contains("coldfustion") = False Then
If packman1.GetApplicationIntent(whichapp).IsInitialized Then
Dim bitm As BitmapDrawable
bitm = packman1.GetApplicationIcon(whichapp)
mListView.AddTwoLinesAndBitmap2("", "", bitm.Bitmap, whichapp)
End If
End If
Next
And it worked fine. Suddenly though it's stopped working and I just get a blank list. It *seems* to be since upgrading to Lollipop. I've tried to fix it with no luck. Could anyone please give me a clue as to what the issue is/how to solve it? Thanks a ton in advance!
Last edited: