Skip to content

BeagleByte/GSMTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

requestCellInfoUpdate (Android Q+), when called, triggers the modem to fetch fresh cell info from the network, clearing any cached or stale data—including data visible to all apps. As a result, any "phantom" or outdated cell towers disappear, and only currently detected towers are shown. This ensures your app displays only real, up-to-date cell information.

A CellInfo can remain in the cache for a long time due to the following reasons:

  • Device Power Saving: The modem may avoid frequent scans to save battery, so cached data is reused.
  • No Recent Network Change: If the device hasn’t moved or changed network state, the system may not trigger a fresh scan.
  • Background/Idle State: When the app is in the background or the device is idle, Android may not update cell info as often.
  • API Limitation: allCellInfo returns the last known data, which can be stale if requestCellInfoUpdate is not called (Android Q+).
  • Radio/Modem Issues: Sometimes, the modem may not clear out-of-date cells due to firmware or hardware quirks.

To always get fresh data, use requestCellInfoUpdate on Android Q+ devices.

Many apps like Wigle do not use requestCellInfoUpdate because:

  • Backward Compatibility: requestCellInfoUpdate is only available on Android Q (API 29) and above. Apps supporting older Android versions must rely on allCellInfo, which uses cached data.
  • Battery Usage: Forcing a modem update can increase battery consumption, especially if done frequently.
  • User Experience: Some apps prefer passive, background scanning to avoid delays or interruptions for the user.
  • Permission Complexity: requestCellInfoUpdate may require more explicit permissions and user consent.
  • Good Enough Data: Cached cell info is often sufficient for most use cases, like mapping or general network info.

Wigle and similar apps prioritize compatibility, efficiency, and simplicity over always having the absolute latest cell data.

Interesting is that with my app updated the cache and Wigle uses the new data

That’s expected behavior. When your app calls requestCellInfoUpdate, it triggers the modem to refresh cell info for the entire system. This updates the shared cache, so any app (like Wigle) that reads cell info afterward will see the new, up-to-date data—even if it didn’t request the update itself. This is how Android’s telephony API manages cell info across all apps.

About

Simple Android APP (API 29) to fetch new LTE and GSM Stations from modem

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages