1

I have made a music player for blackberry playbook and it is working fine .My problem is I want to play the music as a background service so that if user switches between other app . my music would play continuously ..

thanks

Niks
  • 87
  • 2
  • 8

1 Answers1

1

You can do it using this line as the first line of your application

QNXSystem.system.inactivePowerMode = QNXSystemPowerMode.THROTTLED;

From now your app will play sound while the app is in background and also when the playbook is on standby state.

user855693
  • 11
  • 1
  • thanks for the answer ... but when m using this code it says ": Native methods are not allowed in loaded code." ... I google it and tried all the available option on google .. but still getting the same error .. – Niks Jul 21 '11 at 18:24
  • Are you attempting to run this in AIR on the desktop or something? It certainly won't work there. – Peter Hansen Jul 21 '11 at 20:13
  • yes .... so how do I compile it ? I need to compile it on desktop and convert it to .bar file then send that .bar file to my Playbook. That is how it works I think ?? – Niks Jul 22 '11 at 05:38