Skip to content

Add support for connectivity info reporting (signal strength, network type, etc.)

David Shlemayev requested to merge (removed):master into master

Summary

I added a plugin (ConnectivityReport) that will report the following:

  • Network type (5G/LTE/HSPA/GSM/CDMA/etc.)
  • Signal Strength

For each SIM card.

The idea is to enable the following functionalities:

  • Monitor signal strength while connected to hotspot
  • Choose best sim card to use for SMS

After writing the plugin, I noticed !132 (closed), but it had unsolved issues, so I fixed them here.

I copied some code from the new Android SDK that converts between the raw GSM/CDMA RSSI API (available on old Androids) to an abstract number (0..4), the API that does that is only available on Android Marshmallow+.

I don't have a KDE install, so I made the PC plugin for GSConnect, link to PR.

Here's the screenshots:

The signal strength indicator on phone is mirrored on a Gnome PC

The signal strength indicator on phone is mirrored on a KDE Plasma PC

Test Plan

I tested it on my phone, on hotspot and shared WiFi, while toggling between 2G/3G/4G in settings.

Someone with an old phone should test it on old Androids (ICS, Jelly Bean, KitKat, Lollipop, Marshmallow, Nougat) to see if my compat code works.

Misc

Here's a capture of my cpu usage while screen is off, (1) connected via wifi | (2) connected via hotspot, and plugin enabled:

Comparison of CPU usage when hotspot is on/off, when it is off the CPU is mostly in deep-sleep and when it is on it's mostly in low power 691 MHz mode

Edited by David Shlemayev

Merge request reports