【发布时间】:2013-08-27 03:30:44
【问题描述】:
我正在编写一个处理 3G 使用情况的 android 应用程序.. 当用户打开 3G 移动数据连接时,我想计算 3G 使用的经过时间,并在经过的时间到达特定时间时通知用户..
问题是我不知道如何检测 3G On Off 事件以便在这些事件发生时运行某些代码。 请帮我举一个详细的例子 我是安卓初学者。
我试过用谷歌搜索它,但对我没有帮助。 我想调用一个这样的函数:
public void function on3GOnCallback(){
// i will start counting the time here
}
public void function 0n3GOffCallback(){
// `i will stop counting the time here `
}
【问题讨论】:
标签: java android events mobile 3g