I am working on an app which needs to run external LuaJ Interpreter to get the information of the apps running at the system up to now. I found there an code in Java, but not on LuaJ.
This is my attempt to do something.
local pm = activity:getPackageManager()
local packages = pm:getInstalledApplications(activity.GET_META_DATA)
local size = packages:size()
for i=0,size-1 do
packageInfo = packages:get(i)
if not packageInfo:equals(flags) and not packageInfo:equals(FLAG_SYSTEM) and not packageInfo:equals(FLAG_STOPPED) then
print(packageInfo.packageName)
end
end
But there was a problem with "equals(...)". Please help)