icesimon's Blog

  • About Me
  • Archive
  • feeds

Posts match “ BB10 ” tag:

over 8 years ago

How to check debug messages in Cascades?

Just use some simple steps can let you check debug messages!

  1. Open the main.cpp in your project. Only need to add two code snippets!

  2. First: Insert this before int main

    void myMessageOutput(QtMsgType type, const char* msg) 
    

    {
    std::fprintf(stdout, "%s\n", msg);
    std::fflush (stdout);
    }

  3. Second:Inset snippet after Application app(argc, argv);

    qInstallMsgHandler(myMessageOutput);
    
  4. Here are the whole code snippets

    void myMessageOutput(QtMsgType type, const char* msg) 
    {
        std::fprintf(stdout, "%s\n", msg);
        std::fflush(stdout);
    }
    Q_DECL_EXPORT int main(int argc, char **argv) 
    {
        Application app(argc, argv);
        qInstallMsgHandler(myMessageOutput);
    
        // localization support
        QTranslator translator;
        QString locale_string = QLocale().name();
        QString filename = QString( "YourApp_%1" ).arg( locale_string );
        if (translator.load(filename, "app/native/qm")) 
        {
            app.installTranslator( &translator );
        }
        new YourApp(&app);
        return Application::exec();
    }
    

Enjoy all your dubeg messages! ^^

  • BlackBerry
  • Cascades
  • Debug
  • BB10
  • QML
  • c++
  • June 29, 2014 14:47
  • Permalink
  • Comments
 
over 8 years ago

BB10 VS. iOS 8 VS. Android L, Let's compare!

Yesterday I saw an article about visual comparsion of iOS 8 beta and Android L from redmondpie

http://www.redmondpie.com/ios-8-beta-vs-android-l-side-by-side-visual-comparison-screenshots/

I started to think, why not add BB10 into the comparison?

After several hours hard working, I took screenshots on my BlackBerry 10.2.1.2977 OS and BlackBerry 10.3.0.700 OS...

Actually many good features on BlackBerry 10 also be implemented to iOS / Android.
But until now, I still think BlackBerry Hub is the best notification center :D
And the Instant Preview on BlackBerry 10 provide me the best way to reply messages :)

All the images below are arranged via the order :

iOS 8 beta / Android L / BlackBerry 10.2.1 / BlackBerry 10.3.0
Thanks for redmonpie's images and ... Here we go!

1. Lock Screen

2. Home Screen

3. Dialers

4. Calendar

5. Calculator

6. Keyboard

7. Quick-toogles-control

8. Setting

9. Multitasking

10. LockScreen-quickReply

11.Notification

If you want to see more comparison, just leave a comment below :)
Enjoy!

Simon

  • iOS8
  • android
  • AndroidL
  • iOS
  • BlackBerry
  • BB10
  • 10.2.1
  • 10.3
  • Mulittasking
  • homeScreen
  • lockScreen
  • WWDC
  • GoogleIO
  • BlackBerryLive
  • JohnChen
  • July 08, 2014 00:03
  • Permalink
  • Comments
 
over 7 years ago

BB10 connect problem on Mac OS X 10.11 El Capitan

Last Friday I updated my iMac to Mac OS X 10.11 (El Capitan), a nightmare for my whole weekend..

After upgraded, BlackBerry Link no longer recognize my BlackBerry 10 devices.
From Dev Alpha B to Passport.. Just keep showing "Can't connect to your BlackBerry 10 device, press restore.." etc

And then I tried to open my Momentics IDE...


What the....

I think the problem may be the USB driver or connection.
So I did some test.

  1. Reinstall Mac OS X 10.11 (El Capitan)

    Still has the same problem.

  2. Uninstall BlackBerry Link & Blend and reinstall them

    Still has the same problem.

  3. Only install BlackBerry Link

    Oh my God, it works!!

  4. I did more test, but in those tests, once you install BlackBerry Link first and then install the BlackBerry Blend, the connections will all fine!

  5. If you don't need BlackBerry Link, simply uninstall it and just use your Momentics for connecting your BB10 device to debug is also a solution.

    (But for me, I still need Link for backup/restore and Blend to type in Chinese... Can someone tell me why BlackBerry remove the Zhuyin input method on Passport!!)

Just a simple tips and work around for you guys may occur!

Happy Coding!

  • BlackBerry
  • BlackBerry10
  • BB10
  • mac
  • 10.11
  • El
  • Capitan
  • Momentics
  • BlackBerryLink
  • link
  • Blend
  • problem
  • tip
  • Cascades
  • Connect
  • October 06, 2015 07:58
  • Permalink
  • Comments
 
over 7 years ago

Change Screen Brightness - BB10Dev

Sometimes we may need to change the brightness of screen in code.
How to make it happen?
Using the QProcess can help you to do that!

QString program = "bkltctl";
QProcess myProcess = new QProcess(this);
QStringList arguments;
arguments << "brightness" << "set_brightness" << "display" << "50"; (50 is the value you want).
myProcess->start(program, arguments);

PS. You may need to connect SINGAL readyReadStandardError(), readyReadStandardOutput() and finished(int, QProcess::ExitStatus) in order to get the output error or result. :)

Enjoy it!

  • BlackBerry
  • BlackBerry10
  • BB10
  • Cascades
  • development
  • screen
  • brightness
  • Modification
  • Tips
  • October 10, 2015 16:34
  • Permalink
  • Comments
 
about 7 years ago

Use QML to play music in Cascades

MediaPlayer

Steps:

  1. Add bb.multimedia 1.0 in qml file.

  2. Create a MediaPlayer Object.

  3. Set path of file for MediaPlayer. (Need permission for access_shared)

  4. 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

  • BlackBerry
  • BB10
  • Cascades
  • QML
  • MediaPlayer
  • music
  • January 31, 2016 11:13
  • Permalink
  • Comments
 
about 7 years ago

Clipboard usage in Cascades

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

  • BlackBerry
  • BB10
  • Cascades
  • Clipboard
  • Tips
  • February 01, 2016 13:55
  • Permalink
  • Comments
 

Copyright © 2013 icesimon . Powered by Logdown.
Based on work at subtlepatterns.com.