アプリを起動したときにステータスバーをクリックすると通知が再起動し、サーバーから音声がストリーミングされ、ステータスバーからクリアされなくなるまで通知が表示されるため、アプリの通知をクリックすると通知が再起動します。アクティビティとストリーミング音楽の停止..通知からアプリの再起動を停止するための解決策を提案してください。アプリを終了するまで通知バーに表示される通知を表示したいです。また、通知に一時停止と再生ボタンを表示したいので、お願いします。それも助けて
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
nm=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Intent intent = new Intent(this,MainActivity.class);
PendingIntent pi= PendingIntent.getActivity(this, 0, in`enter code here`tent, 0);
String body = " Welcome to streaming ";
String title = "radio";
Notification n = new Notification(R.drawable.png, body, System.currentTimeMillis());
n.setLatestEventInfo(this , title, body, pi);
n.defaults=Notification.DEFAULT_ALL;
nm.notify(uniid,n);`