51
{
52
String action = intent.getAction();
53
54
if (”oms.action.MASTERRESET”.equals(action) )
55
{
56
RecoverDefaultConfig();
57
}
58
}
59 };
9、定义 ContentObserver
,监听某个数据表
60 private
ContentObserver
mDownloadsObserver
=
new
DownloadsChangeObserver(Downloads.CONTENT_URI);
61
62 private class DownloadsChangeObserver extends ContentObserver
63 {
64
public DownloadsChangeObserver(Uri uri)
65
{
66
super(new Handler());
67
}
68
69
@Override
70
public void onChange(boolean selfChange) {}
71
72 }
10、获得手机 UA
73 public String getUserAgent()
74 {
75
String user_agent = ProductProperties.get(ProductProperties.USER_AGENT_KEY,
null);
76
77
return user_agent;
78 }
11、清空手机上 cookie
79 CookieSyncManager.createInstance (getApplicationContext() );
80
81 CookieManager.getInstance().removeAllCookie();
12、建立 GPRS
连接
82 //Dial the GPRS link.
83 private boolean openDataConnection()
84 {
85
// Set up data connection.
86
DataConnection conn = DataConnection.getInstance();
87
找软件资料,就到一览软件文库
http://wk.yl1001.com/rj/