MCPcopy Index your code
hub / github.com/alt236/Floating-Info---Android

github.com/alt236/Floating-Info---Android @v2.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.1 ↗ · + Follow
463 symbols 1,095 edges 70 files 14 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Floating Info

Fun fact: Since Android Nougat apps cannot get the PID of other apps. This makes displaying the Memory info for apps other than Floating Info itself impossible. All other functionality will still work.

Floating Info is an Android application that displays the following in a system overlay window:

  • The application name, package name and process id of the application which is currently in the device's foreground
  • The Global CPU utilisation with a per-core breakdown - This is not foreground application specific.
  • Memory usage breakdown for the currently foregrounded process - except on Nougat+ (read the notes for the caveats).
  • Network information like connection type, proxy status and IP addresses. Both IPv4 and IPv6

Limitations

Since Nougat it is not possible to get the process id of an app different than the one making the request. As a result it no longer possible to get the memory utilisation of other applications.

SE Linux can interfere with getting CPU information as files in the /proc/ folder may not be globally readable.

Android app on Google Play

Screenshots

Click to see in full size:

Changelog

  • 1.0: First public release
  • 2.0: Conversion to Android Studio, Lollipop support, network info, onboarding
  • 2.1: Added Locale info, Oreo support

Notes and Caveats

  • The application will show the memory allocation of the currently foregrounded process which it gets by getting the Process Id of the currently foregrounded activity. This means that if an application has spawned multiple processes, this application will only show the memory utilisation of the main process.
  • The Memory information displayed come via a Debug.MemoryInfo object, while using reflection to expose a number of hidden fields.
  • Data updates happen approximately every 1 second.

Android Memory Usage

Memory management on Android is pretty complex and the easiest way to get started with understanding it is reading this article - especially the "Viewing Overall Memory Allocations" section.

Credits

Author: Alexandros Schillings

Based on GhostLog by Jeff Gilfelt

The icon was adapted from this one.

License

Copyright (C) 2017 Alexandros Schillings

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Extension points exported contracts — how you extend this code

PermissionChecker (Interface)
(no doc) [6 implementers]
app/src/main/java/uk/co/alt236/floatinginfo/permissions/PermissionChecker.java
TextWriter (Interface)
(no doc) [8 implementers]
app/src/main/java/uk/co/alt236/floatinginfo/ui/overlay/writers/TextWriter.java
OnScreenStateListener (Interface)
(no doc) [1 implementers]
app/src/main/java/uk/co/alt236/floatinginfo/service/ScreenStateListener.java
UpdateCallback (Interface)
(no doc) [1 implementers]
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/MonitorTask.java
Callbacks (Interface)
(no doc) [1 implementers]
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/GeneralInfoReceiver.java

Core symbols most depended-on inside this repo

append
called by 39
app/src/main/java/uk/co/alt236/floatinginfo/util/StringBuilderHelper.java
getString
called by 37
app/src/main/java/uk/co/alt236/floatinginfo/data/access/BaseProvider.java
get
called by 26
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/inforeader/InfoStore.java
constructMemoryLine
called by 21
app/src/main/java/uk/co/alt236/floatinginfo/ui/overlay/writers/MemoryTextWriter.java
getDelegate
called by 16
app/src/main/java/uk/co/alt236/floatinginfo/ui/activity/base/AppCompatPreferenceActivity.java
getName
called by 13
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/inforeader/network/model/Interface.java
getBoolean
called by 13
app/src/main/java/uk/co/alt236/floatinginfo/data/prefs/EnabledInfoPrefs.java
getSystemService
called by 12
app/src/main/java/uk/co/alt236/floatinginfo/data/access/BaseProvider.java

Shape

Method 382
Class 74
Interface 5
Enum 2

Languages

Java100%

Modules by API surface

app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/inforeader/memory/MemoryData.java34 symbols
app/src/main/java/uk/co/alt236/floatinginfo/ui/views/SeekBarPreference.java21 symbols
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/MonitorTask.java21 symbols
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/GeneralInfoProvider.java16 symbols
app/src/main/java/uk/co/alt236/floatinginfo/ui/activity/base/AppCompatPreferenceActivity.java15 symbols
app/src/main/java/uk/co/alt236/floatinginfo/util/StringBuilderHelper.java14 symbols
app/src/main/java/uk/co/alt236/floatinginfo/data/access/generalinfo/inforeader/cpu/CpuUtilisationReader.java12 symbols
app/src/main/java/uk/co/alt236/floatinginfo/data/access/BaseProvider.java12 symbols
app/src/main/java/uk/co/alt236/floatinginfo/ui/overlay/OverlayManager.java11 symbols
app/src/main/java/uk/co/alt236/floatinginfo/service/ScreenStateListener.java10 symbols
app/src/main/java/uk/co/alt236/floatinginfo/service/FloatingInfoService.java10 symbols
app/src/main/java/uk/co/alt236/floatinginfo/notifications/NotificationChannelFactory.java10 symbols

For agents

$ claude mcp add Floating-Info---Android \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact