Just use some simple steps can let you check debug messages!
Open the main.cpp in your project. Only need to add two code snippets!
First： Insert this before int main
std::fprintf(stdout, "%s\n", msg);
Second：Inset snippet after Application app(argc, argv);
Here are the whole code snippets
Enjoy all your dubeg messages! ^^
Sometimes we need to keep our app always awake (not dim due to the Screen timeout).
How to make this happen?
The answer is ver simple :D
Jusy put the code into your QML file
Application.mainWindow.screenIdleMode = 1
(1 means KeepAwake, and 0 means Default).
Please be careful, this effect only works when the app is in full screen mode
Once you minimize the app (in Active Frame mode), the screen will still follow the screen timeout rule to dim.
Hope you enjoy this trick!
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
M4A: audio/m4a, audio/mp4
MIDI: audio/midi, audio/mid, audio/x-midi, audio/x-mid
WAV: audio/wav, audio/x-wav