linux - How to calculate when the network card opens a connection on Android -


i trying figure out if there way know when app opens internet connection , wakes network card.

so example, have phone off , decide search http://www.cnn.com

in case, lets imagine no background data going on app, connection idle @ time call website. want know when network card opened connection load page.

i have found no apis this. looking @ telephonymanager has different states of network card (dormant, inout, none, etc), found phone never goes dormant, believe due fast dormancy. have been looking @ linux filesystem files might contain information driver, have found none.

i read nice article att explains mobile networks

http://www.research.att.com/articles/featured_stories/2011_03/201102_energy_efficient?fbid=xev4rtiful9

thanks.

ok answer use signalstrength class , phonestatelistener's onsignalstrengthschanged in order measure radio signal. helps detect when connecdtion made. referenced att's aro app:

https://developer.att.com/application-resource-optimizer http://developer.android.com/reference/android/telephony/signalstrength.html http://developer.android.com/reference/android/telephony/phonestatelistener.html#onsignalstrengthschanged(android.telephony.signalstrength)


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -