0
A I создать уведомлениеДобавить звук уведомления
mBuilder = new NotificationCompat.Builder(this);
mBuilder.setSmallIcon(R.drawable.notification_icon);
mBuilder.setContentTitle("My notification!");
mBuilder.setContentText("Hello world!!!");
Uri notifiSound;
notifiSound = Uri.parse("file://"+Environment.getExternalStorageDirectory().getPath()+"/музыка/Hi-Fi - мы любили.mp3");
mBuilder.setSound(notifiSound);
Intent resIntent = new Intent(this, MainActivity.class);
PendingIntent pendIntent = PendingIntent.getActivity(this, 0, resIntent, 0);
mBuilder.setContentIntent(pendIntent);
NotificationManager mNotifyMng = (NotificationManager) getSystemService(Activity.NOTIFICATION_SERVICE);
mNotifyMng.notify(0, mBuilder.build());
Вход кот
03-07 17:08:26.146: E/UsbDebuggingManager(949): Communication error:
03-07 17:08:26.146: E/UsbDebuggingManager(949): java.io.IOException: Connection refused
03-07 17:08:26.146: E/UsbDebuggingManager(949): at android.net.LocalSocketImpl.connectLocal(Native Method)
03-07 17:08:26.146: E/UsbDebuggingManager(949): at android.net.LocalSocketImpl.connect(LocalSocketImpl.java:290)
03-07 17:08:26.146: E/UsbDebuggingManager(949): at android.net.LocalSocket.connect(LocalSocket.java:130)
03-07 17:08:26.146: E/UsbDebuggingManager(949): at com.android.server.usb.UsbDebuggingManager.listenToSocket(UsbDebuggingManager.java:75)
03-07 17:08:26.146: E/UsbDebuggingManager(949): at com.android.server.usb.UsbDebuggingManager.run(UsbDebuggingManager.java:111)
03-07 17:08:26.146: E/UsbDebuggingManager(949): at java.lang.Thread.run(Thread.java:841)
добавляю звук из SDCard, но ничего. Как добавить звук и звук Android из SD карты? Пожалуйста, помогите
logcat пожалуйста ... –