[maemo-developers] detecting flight-mode and change of cell network status, how to do it?

From: Jonathan Wilson jfwfreo at tpgi.com.au
Date: Mon Jun 27 06:05:08 EEST 2011
Does anyone know of a way to detect flightmode (i.e. phone switching into 
and out of flight mode) or a way to detect a switch of cell network (e.g. 
change between 2G and 3G or change to another operator via roaming)

Analysis of the cellular operator name widget reveals that libconnui has 
functions for this (connui_flightmode_close, connui_flightmode_status, 
connui_cell_net_status_close and connui_cell_net_status_register) but I 
have no idea how to call them as libconnui is unfortunatly undocumented :( 
(which is a pitty as there are a LOT of interesting looking APIs in there)

Note I am not interested in simply being able to obtain the current status 
of these things, I am interested in being notified of changes in the state 
in the way that the cellular operator name widget is.

Presumably libconnui is wiring up to something lower down (dbus or 
whatever) in order to obtain these notifications so we need to figure out 
what its tapping into to get the info.

This is in support of Cell Broadcast SMS so I dont keep displaying stale 
information (no point in displaying the name of a cell tower you last saw 
half-an-hour-ago when you phone switched to 3G and isn't receiving operator 
name SMSs anymore. Although the other option might be to add a timeout and 
say "ok, if we dont receive another operator name SMS in the next x number 
of minutes, we declare the information "stale" and stop displaying it"
More information about the maemo-developers mailing list