MediaPlayer
Steps:
Add bb.multimedia 1.0 in qml file.
Create a MediaPlayer Object.
Set path of file for MediaPlayer. (Need permission for access_shared)
Call the play() function of MediaPlayer. (Need permission Run when background if you want to play music in background).
BlackBerry 10 can support file format below:
AAC: audio/aac, audio/x-aac
AMR: audio/amr, audio/x-amr
FLAC: audio/flac
M4A: audio/m4a, audio/mp4
MIDI: audio/midi, audio/mid, audio/x-midi, audio/x-mid
MKA: audio/x-matroska
MP3: audio/mp3
OGG: audio/ogg
QCP: audio/x-gsm
SPMID: audio/spmid
WAV: audio/wav, audio/x-wav
WMA: audio/x-ms-wma
In C++, need to import LIBS += -lbbsystem
QString text;
bb::system::Clipboard clipboard;
clipboard.clear();
QByteArray byte;
byte = text.toLocal8Bit();
clipboard.insert(“text/plain”,byte);
Remember, the Clipboard need insert QByteArray type.
We can define the String as QByteArray in order to use the Clipboard.
If you need to use some special characters, don't forget to use this line
byte = text.toLocal8Bit();
Here is the official API reference :)
http://developer.blackberry.com/cascades/reference/bb__system__clipboard.html