私は自分のAndroidアプリのプッシュ通知を統合しました、私はすべてのAndroidモバイル/タブのプッシュ通知をオン/オフにしたいです、誰かが私を助けてくれますか...
protected void onPostExecute(BlogInfo result){
if(result.IsNew && result.Blog != null){
NotificationManager manager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.logo, "THE BUTCHER BARKS", System.currentTimeMillis());
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notification.defaults |= Notification.DEFAULT_ALL;
Intent intent = new Intent(Service.this, Bark.class);
PendingIntent pendingIntent = PendingIntent.getActivity(GuruService.this, 0, intent, 0);
notification.setLatestEventInfo(getApplicationContext(), "BARKS", result.Blog.Title, pendingIntent);
manager.notify(1, notification);
}
}