私はしばらくの間Android向けに開発してきましたが、これが通知の最初のショットです。Android SDKチュートリアルで説明されているように通知を設定しましたが、アプリを閉じるまで通知を表示し続ける方法がわかりません。通知の最後にある小さなマイナス記号を無効にします。ユーザーが通知をクリックしたときに通知が消えないようにしたい。通知フラグがあると思いますが…わかりません。私はAndroidSDK2.2で開発しています。これは簡単な質問だと思います。この回答がすでにここにある場合はお詫びします...探していたものを正確に見つけることができませんでした。
// Create notification manager
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
Notification notification = new Notification(R.drawable.ic_launcher, "Ready", System.currentTimeMillis());
Intent notificationIntent = new Intent(this, HomeActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
// Make a notification
notification.setLatestEventInfo(getApplicationContext(), "Ready", "Select to manage your settings", contentIntent);
mNotificationManager.notify(0, notification);