Android Push Notification 을 아래와 같이 구현했습니다.
아래 코드에서 soundUrl 을 row에 들어있는 파일을 지정하면 이상없이 모든폰에서 잘재생이 됩니다.
하지만, 원격파일을 지정하면 (예)https://example.com/sample.mp3) 삼성폰에서는 두가지 모두 재생이 잘되는데 제가 확인하기로 LG폰에서는 재생이 되지를 않습니다. 아직 다른 폰은 태스트를 하지는 않았습니다. 원격파일이라고 해서 재생이 되지 않을 이유가 없는데 말입니다.
태스트한 LG폰은 LG-740 LGX skin 이고 버전은 6.0 입니다.
꼭 해결해야해서 아시는 고수님께서 알려 주시면 감사하겠습니다.!! 꾸벅~
Uri soundUri= Uri.parse(soundUrl);
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(context)
.setDefaults(defaults)
.setSound(soundUri, 2)
.setAutoCancel(true);