0
我試圖顯示我的IntentService的通知表單。嘗試通知
但沒有顯示: - ((((
public class CreditcheckService extends IntentService {
AlertDialog dialog;
public CreditcheckService() {
super("CreditcheckService");
}
@Override
protected void onHandleIntent(Intent intent) {
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.icon)
.setContentTitle("My notification")
.setContentText("Hello World!");
NotificationManager mNotificationManager =
(NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(999, mBuilder.build());
}
請問您的通知碼從一項活動工作? – Merlevede