Thanks... That's what I was looking for.
Completely off-topic... but quick question.
I just upgraded to Android 5.0.0 and wiped the data. Thus it is now taking most of the processor power installing; which is all normal natural stuff that happens.
However, because of the enormous downloading of gigantic amounts of Apps from WiFi backup, it's bogging down the system.
If I run my App while such a load on the operating system is occurring it ends up taking forever Building the Queue.
Is there a way to monitor the total percent of Android use? so I can bring up a warning or stop the App from doing heavy-duty things whenever the overall Android load is too heavy? (Building the Queue just takes too long and initiates WAIT states; so I need to not update the queue until Android's total load has reached a reasonable level).
I don't know what 'Overall Android Load' is called, either. Is there a name for it? On a PC it would be called "Calculate CPU Utilization".
They talk of a file called proc/stat
http://www.linuxhowtos.org/System/procstat.htm
Is there any Library that you know of that accesses the data and makes it available?
In theory I should be able to read the file if I just back up one folder; but it isn't working.
Should look something like this?
Is there some android.permission I need to set? Would the user need to be Rooted?
Sub The_CPU_Utilization(BlankString As String) As Int
Dim ReturnValue As Int
Dim TheText As String
Dim StatName As String
ReturnValue = 0
StatName = "//proc/stat"
If File.ExternalReadable Then
If File.Exists(File.DirRootExternal,StatName) Then
Log("Get_CPU_Usage() - " & StatName & " EXISTS")
' TheText = File.ReadString(File.DirRootExternal,StatName)
Else
Log("Get_CPU_Usage() - " & StatName & " DOES NOT EXIST")
End If
Else
Log("Get_CPU_Usage() - External is Not Readable")
End If
' Parse TheText Here and set ReturnValue = CPU Utilization
Return ReturnValue
End Sub
I have verified with a directory App that the proc folder is there, and it is in android's root right next to the sys, system, storage and sdcard folders.