Add network speed information to the status bar

How can I show some of the information (in my case, the data transfer speed between the device and the server) in the device status bar, as shown below:

enter image description here

I am new to Android. All suggestions will be appreciated.

+5
source share
1 answer

I will try to offer a solution, maybe this will help!

1- get transfer data (load and load) stored in two variable strings (if the values ​​are no longer strings, you can use ".toString ()" or ".valueof", it depends

2- now create a constant notification containing two lines and a couple of icons and this should help you:

-permamnet notif in the notification panel: https://developer.android.com/reference/android/app/Notification.Builder.html#setOngoing%28boolean%29

- for badges: https://design.google.com/icons/

0
source

All Articles