android新手 Notfiction简单创建过程

来源:互联网 发布:长沙聚丰网络武汉飞游 编辑:程序博客网 时间:2024/04/29 19:45
//创建通知实例Notification notification=new Notification();//设置图标notification.icon=R.drawable.a;//设置内容notification.contentView=new RemoteViews(getPackageName(),R.layout.notify);//设置跳转notification.contentIntent= PendingIntent.getActivity(this,0,new Intent(this,MainActivity.class),0);//开启startForeground(1,notification);

0 0
原创粉丝点击