2014年3月25日

摘要: 1、发送广播使用Intent发送广告Intent intent=new Intent();intent.setAction("mybroadcast");sendBroadcast(intent);2.在xml注册广播接收者 2、接收广播public class My extendsBroadcastReceiver{public void onReceive(Context context, Intent intent) { System.out.println("接收");} } 阅读全文
posted @ 2014-03-25 18:23 axiaoquana 阅读(276) 评论(0) 推荐(0)
摘要: 一、实现的思路 点击Notification,跳转到一个空白的activity,在空白的activity种弹出AlertDialog ,然后finish()。 Notification的使用方法,1.通过系统服务拿到NotificationManager。2.使用NotifiactionManager的notify方法二、代码如下public class NotificationTest extends Activity{ static final int NOTIFICATION_ID = 0x1123; @Override public void onCreate(Bundle sav.. 阅读全文
posted @ 2014-03-25 17:58 axiaoquana 阅读(461) 评论(0) 推荐(0)

导航