0
startForegroundを使用して私のサービスからスティッキー化を開始しています。通知は表示されますが、クリックしたときに表示されるタイトルや意図などの設定は有効になりません。スティッキーニングに何も設定できません
@Override
public void onCreate()
{
Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);
Notification notification = new NotificationCompat.Builder(this)
//.setSmallIcon(R.mipmap.app_icon)
.setContentTitle("My Awesome App")
.setContentText("Doing some work...")
.setContentInfo("Server is running")
.setContentIntent(pendingIntent).build();
startForeground(1337, notification);
super.onCreate();
}
通知がクリックされたとき、それは私がそれをforestopまたはアンインストールすることができ情報をアプリに私を取る
....詳細はアプリ名とタッチを示しまたは停止します。