Additional libraries, classes and official updatesUsers contributed libraries, classes and official updates.
This forum is open for licensed users only.
I present you thé OS Lib. aka. the Operating System Library.
This 'giant' library has around 60+ commands.
Everything is explained in the library itself.
What does it cover:
- Memory size of directories
- Tons of hardware strings (e.g model, device, host, ...)
- A unique, very easy countdown timer with 2 events (easier than timer
Code:
Dim OS As OperatingSystem OS.Initialize("OS") OS.CountDownTimer(1000)
Sub OS_ontick (ms aslong) toastmessageshow(ms,false) end sub
Sub OS_onfinish (OS AsString) Msgbox(OS,"OS Library") 'get the secret message in here ;) End Sub
- CPU information
- Running services, tasks, sending signals
- Rebooting (and wiping data)
- and a lot more!
Note that it is still in beta and errors may still occur. ( I haven't tested all functions yet.)
Please tell it here when, why, what, etc happened.
It is also possible that I didn't add a certain permission as I can't find them always.
I like feedback as it gives me more motivation.
(now go and make your own task killer :^))
I seem to have a Nullpointerexception when I retrieve the currentProcesses, etc.
Code:
/** * Returns a list of application processes that are running on the device. * * @return */ publicList<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses () { ActivityManager am = (ActivityManager)ba.activity.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningAppProcessInfo> l = am.getRunningAppProcesses(); return l; }
The error is related to here:
getRunningAppProcesses () {
ActivityManager am = (ActivityManager)ba.activity.getSystemService(Cont ext.ACTIVITY_SERVICE);
ba.activity is only available if you declare your object with @ActivityObject.
You do not need it here.
Instead use: BA.applicationContext.
This is the static context which is always available.