Android通知システムのデフォルト音またはカスタム音の使用
410 ワード
NotificationManager manger = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification();
// ram ,
notification.sound=Uri.parse("android.resource://" + getPackageName() + "/" +R.raw.mm);
//
notification.defaults=Notification.DEFAULT_SOUND;
manger.notify(1, notification);