icesimon's Blog

  • About Me
  • Archive
  • feeds

Posts match “ Tips ” tag:

over 8 years ago

[Tips] 'Unresponsive’ or ‘Unable To Terminate' your bb10 app when coding?

How To Squash ‘Unresponsive’ or ‘Unable To Terminate’ Errors When Debugging your BB10 App on Device

THERE ARE TWO WAYS TO RESOLVE THESE ERRORS

1) Restart your BB10 Dev Alpha, then turn Dev Mode on (take a few mins)

2) Kill the app manually via Momentics IDE I will show you how to quickly kill the app using the following steps. Follow along. (take a few seconds)

Open Target Navigator

Window - Show View - Target Navigator

Locate Device Process

Go Under Device Ip - Select Process

Send Signal To Application

Go Under Device Ip - Select Process - Right Click - Click Deliver Signal

Terminal Process/App Manually

Select SIGTERM option - Press OK

That’s it!

After you send the SIGTERM (Signal Terminate) your unresponsive app will disappear from the BB10 device. Success! Now, build (CTRL+B), deploy (CTRL+11) and test again.

  • Cascades
  • Debug
  • Tips
  • BlackBerry
  • Unresponsive
  • Unable-to-terminate
  • depoly
  • signal
  • SIGTERM
  • July 09, 2014 22:17
  • Permalink
  • Comments
 
over 7 years ago

Debug Tips for BB10 Headless apps.

Debug BB10 Headless Apps is really a hard topic for developers.
Before the latest Momentics update, debug is even harder..

By Momentics 2.1.2, developers can follow this instruction to debug your headless apps.

https://developer.blackberry.com/native/documentation/dev/tools/debugging_headless_apps.html

Here I am going to share my experience for debugging headless apps.
I put the logs into notification and show them in Hub!
If you have some problems on debugging headless apps on BlackBerry 10, maybe this trick can help you and save lots of time! :)

GOGOGO, keep developing on BlackBerry 10!

  • Tips
  • Momentics
  • Cascades
  • BlackBerry
  • BlackBerry10
  • headless
  • Debug
  • July 04, 2015 22:19
  • Permalink
  • Comments
 
over 7 years ago

Keep Screen awake - BB10 Dev

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!

Simon

  • BlackBerry
  • BlackBerry10
  • Cascades
  • awake
  • dim
  • screen
  • QML
  • application
  • Tips
  • October 08, 2015 20:49
  • 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

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.