3 Replies Latest reply on Jul 8, 2015 2:44 PM by Remco van 't Land

    Adding a (sound) file to package/apk.

    Remco van 't Land

      Hi all,

       

      We've been trying to add some specific sound files to our package and can't seem to figure out why it doesn't work.

       

      We've added them to this folder: C:\MotorolaRhoMobileSuite4.1.1\ruby\lib\ruby\gems\1.9.1\gems\rhoelements-4.1.11\libs\rhoelementsext\ext\android\adds\res\raw

       

      And while I see them listed during the compile and they show up in the APK:

      RET:  2406888 res/raw/fd_topfade.png (OK)

      RET:  2407176 res/raw/fd_transferimage.png (OK)

      RET:  2412052 res/raw/fout.wav (OK)

      RET:  2437288 res/raw/goed.wav (OK)

      RET:  2452776 res/raw/header.png (OK)

      RET:  2455300 res/raw/jsobjects.js (OK)

      RET:  2546852 res/raw/leeg.wav (OK)

      RET:  2590984 res/raw/logo.gif (OK)

      RET:  2593892 res/raw/menu.html (OK)

      RET:  2603552 res/raw/moto.png (OK)

      RET:  2605804 res/raw/pressed_item.png (OK)

      They're not available after installing the APK on an MC40.

       

      Is there some manifest I have to add them to to get them installed on the device with the package?

       

      Thanks in advance!

        • Re: Adding a (sound) file to package/apk.
          Robert Galvin

          Why are you adding them to: : C:\MotorolaRhoMobileSuite4.1.1\ruby\lib\ruby\gems\1.9.1\gems\rhoelements-4.1.11\libs\rhoelementsext\ext\android\adds\res\raw?

           

          How are you trying to access them once the APK is installed?

           

          You should consider adding them to the project www folder and then using the Rho.Application helper APIs

           

           

               var appFolder = Rho.Application.appBundleFolder;
               var appsBundleFolder = Rho.Application.appsBundleFolder;
               var databaseBlobFolder = Rho.Application.databaseBlobFolder;
               var publicFolder = Rho.Application.publicFolder;
               var userFolder = Rho.Application.userFolder;