当前位置:   article > 正文

android服务- Notification创建通知 - startForeground 使用前台服务_startforeground notification.builder

startforeground notification.builder

版本3.0以上,推荐使用NotificationCompat.Builder类来构建Notification。


  1. <span style="font-family:FangSong_GB2312;"> </span><span style="font-family:Courier New;"> @Override
  2. public void onCreate() {
  3. super.onCreate();
  4. long[] vibrates = {0, 1000, 1000, 1000};</span>
  1. <span style="font-family:Courier New;">
  2. //使用前台服务
  3. Intent intent = new Intent(this, MainActivity.class);
  4. PendingIntent pendingIntent = PendingIntent.get
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/464508
推荐阅读
相关标签
  

闽ICP备14008679号