您现在的位置是:主页 > news > 怎样实现wordpress订单提醒功能/seo搜索引擎优化是

怎样实现wordpress订单提醒功能/seo搜索引擎优化是

admin2025/5/3 15:29:05news

简介怎样实现wordpress订单提醒功能,seo搜索引擎优化是,上海新闻网最新消息,新疆乌鲁木齐做网站将service和notifaction绑定在一起的时候notifaction是无法移除的,我google了一下发现更新builder.setongoing(false)就可以移除了,但是我自己写了简单的代码发现并没有起作用。希望可以指出那里出现了问题。activityIntent i new Intent(this,MyServic…

怎样实现wordpress订单提醒功能,seo搜索引擎优化是,上海新闻网最新消息,新疆乌鲁木齐做网站将service和notifaction绑定在一起的时候notifaction是无法移除的,我google了一下发现更新builder.setongoing(false)就可以移除了,但是我自己写了简单的代码发现并没有起作用。希望可以指出那里出现了问题。activityIntent i new Intent(this,MyServic…

将service和notifaction绑定在一起的时候notifaction是无法移除的,我google了一下发现更新builder.setongoing(false)就可以移除了,但是我自己写了简单的代码发现并没有起作用。希望可以指出那里出现了问题。

activity

Intent i = new Intent(this,MyService.class);

startService(i);

service

if (intent.getAction()==null){

NotificationCompat.Builder builder = new NotificationCompat.Builder(this).

setContentTitle("wo")

.setContentText("n")

.setOngoing(true)

.setSmallIcon(R.mipmap.ic_launcher);

Intent i = new Intent(this,MyService.class);

i.setAction(ACTION);

PendingIntent pi = PendingIntent.getService(this,0,i,PendingIntent.FLAG_UPDATE_CURRENT);

builder.setContentIntent(pi);

startForeground(100,builder.build());

}else if (intent.getAction().equals(ACTION)){

NotificationCompat.Builder builder = new NotificationCompat.Builder(this).

setContentTitle("wo")

.setContentText("n")

.setOngoing(false)

.setSmallIcon(R.mipmap.ic_launcher);

startForeground(100,builder.build());

}

return super.onStartCommand(intent, flags, startId);

}

请问那里出现了问题(点击notifaction更新通知,想要实现类似于google music的通知效果),请问那里出现了问题码,谢谢?