4 Replies Latest reply on Sep 25, 2016 6:14 PM by Johnathon Beals

    Issue with Notification.playFile on android

    Alpesh Budhia



      We are having an issue with playing a media file in Rhomobile 4.0 using the notification API call. The wav file exist in our project in a folder called /public/alerts, during the build process it's copied to bin folder and added to the apk.


      This is our API call:



      In the rholog from the client we are getting the following:

      RhoFileApi| Can not open file descriptor: /public/alerts/Notify.wav: open failed: ENOENT (No such file or directory)

      NotificationSingleton| null


        at android.media.MediaPlayer.setDataSource(Native Method)

        at android.media.MediaPlayer.setDataSource(MediaPlayer.java:1186)

        at com.motorolasolutions.rho.notification.NotificationSingleton.playFile(NotificationSingleton.java:126)

        at com.rho.notification.NotificationSingletonBase$playFileTask.run(NotificationSingletonBase.java:93)

        at com.rhomobile.rhodes.api.MethodExecutor.run(MethodExecutor.java:11)

        at dalvik.system.NativeStart.run(Native Method)


      Any ideas why this would not be working?