cancel
Showing results for 
Search instead for 
Did you mean: 

Playing sound/beep on the handheld device using WebDynpro for Java (NW7.01)

Former Member
0 Kudos

Does anybody know if we could play sounds or beeps on the handheld device using WebDynpro for Java (NW7.01)? We have a client requirement to have the handheld device beeps/makes different kind of sounds after the goods receipt is posted. We are looking for a way to play the sounds thatu2019s saved on the deviceu2019s directory. Appreciate any suggestions or input.

Thank you!

Teeracha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

well, WD handles events and is Java, so in the Event handling place:

AudioPlayer test = new AudioPlayer("YOUFILENAME");

test.play();

and it will play the sound. It works fine for me, so it should work fine for you. As well it workson PDA, cause Creme knows AudioPlayer as well.

Hope this helps.

Regards,

Oliver

Former Member
0 Kudos

Hi Oliver,

Thank you very much for your response. Our developer was using the same class, but he said it was not able to read the sound device on server and was resulting in dump. The response might be considering a case when WebDynpro is running on same system as of webAs java server. Do you have any suggestion on this? The device we're using is MC9090 with Windows Mobile 5.0.

Thanks again,

Teera

Former Member
0 Kudos

Hi,

playing sounds is at least not officially supported by Mobile Web Dynpro, so I don't think that it will work out of the box.

What you could try, depending on your NetWeaver Version is to use JavaScript to play sounds. Please keep in mind that the insertion of JavaScript into Mobile Web Dynpro is not officially supported by SAP, but it works at least for the version SAP NetWeaver 7.0.

Best Regards,

Stefan

Former Member
0 Kudos

Hi,

I find it strange that you see this error message - due to the fact, that you try to use a Creme method. Have you tried to run the MP3 Player delivered by Creme or even to simply use Creme without MI to play a sound? I would suggest the issue is more a wrong path or filename - can be a format issue as well. But in princiopal: you want to run it in pure Java Code, the WD-Client just gives you the event to do that - so it should be possible?!?

I have used it several times with all other clients (JSP, AWT) and it works fine for us.

Regards,

Oliver

Former Member
0 Kudos

Hi,

my understanding was that you are using Mobile - Always Connected, with a browser based solution and no installation on the client at all. If this is not true and If you are using Mobile for Occsionally Connected clients with an installed instance on the device, I agree with Oliver and it should work.

Best Regards,

Stefan

Former Member
0 Kudos

Yes, Stefan. We are using the browser-based mobile solution. There's no installation on the client.

Does this mean it's not possible to achieve what we want to do on Mobile - Always Connected solution?

Thank you,

Teera

Former Member
0 Kudos

Hi Teera,

sorry, I thought you are using the Client version on the device - While using always online, playing sound is not supported by WebDynpro on the device. You can try JavaScript coding as mentioned by Stefan earlier, but this will only work 100% in your environment. If you switch browser you run into the typical issues. But at least it is worth to try it.

Hope that helps.

Regards,

Oliver

Former Member
0 Kudos

Thank you, Oliver and Stefan, for your help on this. Now I got the confirmation. Thanks again!

Former Member
0 Kudos

Hi Former Member,

     Playing sound/beep on the handheld device using WebDynpro Java (7.1)  i saw the Above discussions thats was help ful to me, and i am new to this Java web dynpro, i need more clarifications in above discussion.

  • Is it possible to  use JavaScript in web dynpro java to play sounds? if yes Please explain where should i use?
  • Is any other alternatives is ter to achive this functionality in web dynpro java, if yes Please explain me.

Thanks & Regards,

Naveen kumar.

i am waiting for your reply

Playing sound/beep on the handheld device using WebDynpro for Java (NW7.01)Playing sound/beep on the handheld device using WebDynpro for Java (NW7.01)

Former Member
0 Kudos

Hi Terracha,

you can use bellow mentioned methods for playing a sound using javascript :

function playSound( url ){  
  document
.getElementById("sound").innerHTML="<embed src='"+url+"' hidden=true autostart=true loop=false>";
}

or

https://github.com/admsev/jquery-play-sound

$.playSound('http://example.org/sound.mp3');

Hope that helps you as a workaround way.

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas Divakarla,

         

    Thanks for your reply,

       Still i need more clarifications about where to place the sound file, Shall we keep it in mime           Folder or in mobile device ?

Former Member
0 Kudos

the best way could be, to host it somewhere.

Former Member
0 Kudos

Thank you Srinivas,

Could u pls tel me  place Where we should host it? in MIME's or device which we r using  or any other alternaitve way? 

Answers (0)