SuperbookKing

2012年7月30日

13.系统级别事件处理之广播broadcast

摘要: myactivityintent.setAction(ACTION);sendBroadcast(intent);//////////////xml注册<receiver android:name=".service.MyReceiver" android:label="@string/app_name"> <intent-filter ><action android:name="android.provider.Telephony.SMS_RECEIVED"/></intent-filte 阅读全文

posted @ 2012-07-30 21:16 SuperbookKing 阅读(184) 评论(0) 推荐(0)
12.状态栏通知之notification

摘要: notificationtry{ Log.i(TAG, "service 线程文件下载:"+Thread.currentThread().getId()); showNotification(false); Thread.sleep(10000);} catch (InterruptedException e){ // TODO Auto-generated catch block e.printStackTrace();}showNotification(true);//////////////////////////////private void showNotifi 阅读全文

posted @ 2012-07-30 18:37 SuperbookKing 阅读(175) 评论(0) 推荐(0)
11.后台执行之Service

摘要: AServiceis an application component that can perform long-running operations in the background and does not provide a user interface.Service 后台长时间执行的控件service 声明:<service android:name=".service.ExampleSercice"/>1Started 调用者与服务者没关系oncreate->onstartCommand ->ondestroy2Bound调用者与服务 阅读全文

posted @ 2012-07-30 17:32 SuperbookKing 阅读(228) 评论(0) 推荐(0)