Painter – My First App

by JoeQXS

BlackBerry World App - Painter

BlackBerry World App – Painter

Painter was my first project that got me into application development and is currently available in Blackberry World for all BB10 devices (as of the latest release). The application lets users load a picture onto a canvas and then draw on it with any color they wish (basically it’s like MSPaint). Conceptually, Painter is very simple – You load a picture and layered on top of that picture is a webpage with a transparent background. However, I did face several challenges and I wouldn’t have even released the application if it wasn’t for the support I received from another developer.
Prior to playing with mobile application development, I had worked with webpages for many years – they were essentially my introduction to programming (if you want to call it that). In 2010, HTML5 went mainstream and I was amazed at the new concepts it introduced and their potential. . One thing in particular stood out: the canvas element which allows you to create images in your browser. It reminded me of an Intro to Programming course I took in high school where we learned how to make UI elements in Java. I thought it was very boring at the time, but now that I look back, I wish I had paid more attention.

Basically you draw shapes (polygons, circles, lines, whatever) based on a coordinate system. So in a canvas you can draw lines that follow your mouse’s movements. Something like: grab the coordinates of the mouse then draw lines between the coordinates. Depending on how fast this is processed, you can get some very smooth lines.
Now this HTML5 stuff was cool when it was introduced, but for a long time, it wasn’t supported. Fast forward a couple years, to 2013 and BlackBerry finally released their BB10 series. I preordered my Z10 so I would get the device as soon as it was avaliable in the US. These devices boasted superior web browsing capabilities, and I could hardly believe the things that it could do. The devices ran a webkit browser, the same engine under the hood of Google Chrome, Chromium, and Safari. Not only that, BlackBerry had signed a deal with Adobe to include Flash baked into the browser. This sucker was FAST and its specifications blew away modern desktop browsers! And it’s only gets better.

This amazing web support wasn’t just limited to web browsing, it also allowed developers to use HTML5 as a platform for coding – BlackBerry had also tied it into their QT platform, Cascades. Cascades uses a fusion of C++ and Javascript, and contains a handy little thing called a webview which acts like an iframe. So what this boils down to is an amazingly versatile platform that lets you do just about anything you can imagine while making it easy to get things looking good.

This information was the only developing knowledge I had when I started working on Painter. Painter started as an example I made for a developer on Crackberry, Nemory. He was diligently working on setting up a native Snap2Chat app for BlackBerry users. I’ve seen a couple friends using the app on their non-BlackBerry phones and thought that it had some pretty cool features, one of which was the ability to draw on the images they took prior to sending them.

Nemory had posted his packaged app for people to test and provide feedback. I got hold of a copy and was curious how it worked. I opened it up and saw that he had a pretty basic HTML file tucked away in it that would let you draw on a canvas. I assumed he started on a different approach in implementing the drawing feature as he had some weird thing that would draw squares in a line that followed your finger (imagine lining up a deck of cards in a diagonally). I thought that an alternative method using a canvas to draw on top of a picture would be smoother. Follow that by taking a screen shot and saving it and the idea should work fine. Turns out I was right.

I started building an example to send to Nemory. What I ended up with was a picture with a canvas on top of it, the program had a basic color-picker and would let you save the drawing. Excitedly, I sent Nemory an email of my discovery. He responded quickly with gratitude and encouraged me to start making apps.

I thought to myself that it would be cool to have something like the Snap2Chat coloring thing for editing pictures. I added a file picker and spruced things up a bit, tossed in some optimized code Nemory helped me write and submitted it to BlackBerry World. One of the more complicated things I included was some C++ code I found in the examples BlackBerry provides to its developers and another chunk of C++ Nemory sent me to help with rotated images.

The complicated C++ code I included allowed Painter be invoked contextually by images and to rotate images when they were loaded. This introduction to C++ was very difficult for me. Don’t get me wrong, I’ve played with C++ before, but nothing on this level. My only experience with C++ was some basic math and printing strings. Applying C++ to something functional is completely different. I was so confused at the errors I kept getting, but I finally discovered the issue. I needed to tell the program beforehand what I was going to be doing in something called a ‘header’. I know what you’re thinking, computers aren’t supposed to question programs, right? Wrong! If I didn’t tell the compiler what I was going to do it would complain and spit an error in my face, C++ is bratty that way. Eventually I got it pinned down after hours of researching Google on how I can get C++ to obey me in Cascades.

Working with C++ code was the most challenging part for me in developing Painter. Luckily, BlackBerry has great reference materials and a great community full of supportive developers to help out the new guys (and girls).

BlackBerry shifts towards Android

by DeanLogic

The day before the quarterly financial results were announced, BlackBerry announced that they would be pre-loading Amazon Store on their BlackBerry 10 devices when the OS version 10.3 is released in the fall.  Amazon Store is a branch of Android apps and by providing the store automatically, BlackBerry has made available a large amount (200,000+) of apps for their customers. While this is not the same as having Google Play loaded on the phones, it is probably as close as BlackBerry wants to be to offering an Android phone that is not an Android phone. For Native developers of BlackBerry 10, it is probably too comfy of a deal.

Currently, if an Android developer wished to have their app in BlackBerry World, they would port their app using a tool provided by BlackBerry to create a bar file, which could be uploaded to BlackBerry World.  For the most part, porting an app would work without any issues.  However, there are many apps that don’t work completely and others that work, but don’t utilize the BlackBerry 10 UI very well.  This short coming of ported app left an opening for the developer or another developer to create the app using the BlackBerry 10 Native development tools.  BlackBerry would also help the Native apps stand out by offering a Built for BlackBerry sticker for those apps that met the criteria.  Getting the Built for BlackBerry certification has been a bit daunting for some developers.  But, having the sticker does give the app a benefit when listed in BlackBerry World, for the most part.  Even with a small, compared to Apple and Android, app store, apps can still be hidden by the many duplicate apps.  Even just having too many apps on a store can cause problems, as the majority of apps are never downloaded.  Needless to say, getting your app seen and downloaded is a tough road for developers and BlackBerry’s deal with Amazon, might not be as helpful as they think.

The first issue is; where does the customer go now that there are two stores on their device. According to BlackBerry, the apps on BlackBerry World that are not games or fun or not helpful in productivity, will not be promoted.  This is part of BlackBerry’s strategy to win back the enterprise user.  My guess is, by making BlackBerry World look as if it only has productivity apps and not a bunch of fart apps, it will give it more of a professional appearance. Which means, if you want games, go to the Amazon Store.

While this is helpful for the Android developer, the Native game developer now has to make sure their game can be ported to Android, less it never get any sort of promotion in BlackBerry World.

The second issue is; what is done with all the Android apps left on BlackBerry World.  I sent a tweet to BlackBerry Development asking if they were going to remove the Android apps from BlackBerry World.  The reason behind this is simple, the developer no longer has to take the extra step to publish their app for BlackBerry and once the developer does move their app to the Amazon Store, they have no reason to keep up the app on BlackBerry World.

It is unknown how this addition will affect Native apps. But, if BlackBerry wants to encourage developers to continue using their Native tools, it would be helpful if they showed some sort of support by making BlackBerry World for Native apps exclusively. BlackBerry just recently announced to the developers that they were ending support for AIR based apps and that when 10.3 is launched, the apps would simply disappear from user’s devices.  If BlackBerry can eliminated one of their first development tools for BlackBerry 10, then doing a complete split between Native and Android shouldn’t be an issue. While some might claim it would alienate Android developers, I contend that they have already alienated those developers who took the time to learn the Native tools.  And they have also given the Android developers a step up by basically stating that it is more important to have access to the Android apps than to spend time and money getting them made as Native apps.

I don’t have to spend money on the consumer side. Chen

I believe that Chen should figure out what he can do to make Native developers happy in the next few months.  He can start with a clarification of what is an enterprise app and what the future of BlackBerry World will look like.  He might also consider that if BlackBerry just became another Android phone company, that they would lose the loyal customers that have stuck with them through this transition and also lose those who switch due to taking a chance on a BlackBerry 10 phone and loving it.

Meetup for BlackBerry 10 release 1.2.0

by DeanLogic

I have done a minor/mid release (1.2.0 / 4.2.0) for the Meetup app. I updated the build OS to 10.2. I figured at this point, everyone should have updated their device to 10.2.1. Another push for updating to 10.2, is that BlackBerry has already announced 10.3 and provided beta simulators, so that developers could get started updating their apps or building new apps with the new features. I don’t plan on pushing out a 10.3 version until I feel that the majority of my users have upgrade.

One of the reasons I wanted to go to 10.2 is the addition of minimum and maximum fonts. I’m not one to modify my font sizes, but I know there are plenty of people who do. The problem with modifying the font size is that text areas that were created to work with a certain sized font, get really messed up when someone has their default font set to 20 or something. Having the minimum and maximum allows for some control of the look, while giving some flexibility to users who need to adjust their font size.

While chatting with another developer on the BBM Group Baby Steps:BB Dev about keeping the category headers in view while scrolling up the list. Something that was obviously working in the Hub, but not on our listviews. After a little bit of searching, the developer found a way to make them “sticky”.

ListView {
	id: myListView
	objectName: "myListView"
	topPadding: -6
	layout: StackListLayout {
		headerMode: ListHeaderMode.Sticky

Simply adding a headerMode to the layout with they type of Sticky is all that’s needed. But, since I had no reason to add layout information to the ListView, I never noticed this option. Just another one of those things you stumble upon when trying to code and application.

Hopefully I will have the time to make some more needed changes to the base application. I know there are people wanting more edit features with the Meetup application and I plan to provide them.

Author Box Adding Additional Contacts Hack

by DeanLogic

After posting about another app created by a developer in the Baby Steps: BB Dev BBM Group, I asked the group if anyone wanted to post an article on my blog about what is like to work with the BBM Group. Since the developers in the group are always thanking each other for help, I figured it would be good for developers outside of our group to know that there are groups who like to be helpful to each other when developing apps. And, since it is always good to get multiple opinions, I figured it would be good for some other people in the group to write some articles. Also, I wanted to help those guys by spreading the word about their app development efforts. This is where the Author Box came in.

I had messed with Author Boxes on other blogs before. They are very helpful when you have a blog with many authors, so that the new reader can get an idea of who is writing the article. For my blog, I didn’t need it, because, well, it was just my blog. Having added the feature before, I figured it would be a simple as grabbing the plug-in and installing it. It would have been simple, if I hadn’t made my blog into a multi-blog (which I still haven’t totally implemented yet), instead of a single blog. The first Author Box plug-in I found didn’t work. Nor did the second one. On my third try, I found Author Box After Post by Jeriff Cheng.
This plug-in seemed a bit more straight forward than the others, which is probably why it worked. It was so simple, that I thought I would modify it to add BlackBerry World Vendor (BBW Vendor) and BlackBerry Messenger Channel (BBM Channel) as two new contact methods. The reason I wanted to add those two, would be for the guest authors to help promote their apps and their app Channel. As I started working with the plug-in, I noticed that the Twitter link would show regardless if I had added a Twitter Username to my contact list. The issue was that the Twitter URL used “https” instead of “http”, which lead the plug-in writer to append the Twitter URL to the Twitter Username in the initial contact creation.

  if ( isset( $contactmethods['twitter'] ) )
    unset( ''.$contactmethods['twitter'] );

Which meant that if you even if you didn’t have a Twitter account, it would still be saved with the value of the pre-URL. The later check for a value was useless, because it would always have a value.


I removed it from the initialize portion and added the pre-URL to the display code after the check for the value.

Also, I noticed that if you only had 1 contact, there was a  •  left after that one contact. That seemed a little bit odd, so I checked into and noticed that the code was there for all the contacts expect the last one. I decided to do a check first to see if the contact was the next contact and then append  •  in front of the link for the contact value.

$isNext = false;

	if($isNext) {
		$abap_skype_url='&nbsp;&#8226;&nbsp;<a rel="me nofollow" href="skype:'.$abap_skype_url.'?call" target="_blank">Skype</a>';
	} else {
		$isNext = true;
		$abap_skype_url='<a rel="me nofollow" href="skype:'.$abap_skype_url.'?call" target="_blank">Skype</a>';
}else {

If if wasn’t the next contact, it was the first one, so I would set the isNext value at that point and not include the pre-code.

Finally, I added the code to add my two new contact values. Which basically consisted of initializing/de-initializing the values

//Remove user contact methods
 if ( isset( $contactmethods['bbmchannel'] ) )
    unset( $contactmethods['bbmchannel'] );	

 if ( isset( $contactmethods['bbwvendor'] ) )
    unset( $contactmethods['bbwvendor'] );
//Add user contact methods
  if ( !isset( $contactmethods['bbwvendor'] ) )
    $contactmethods['bbwvendor'] = __('BlackBerry World Vendor ID (ie. 12345)'); 

  if ( !isset( $contactmethods['abap_avatar'] ) )
    $contactmethods['abap_avatar'] = __('Custom Avatar Image URL');

Fetching the input values for the user

$abap_bbmchannel_id = get_the_author_meta( 'bbmchannel' );
$abap_bbwvendor_id = get_the_author_meta( 'bbwvendor' );

Creating the output display for the values

	if($isNext) {
		$abap_bbmchannel_id='&nbsp;&#8226;&nbsp;<a  rel="me nofollow" href="' . $abap_bbmchannel_id . '" target="_blank">BBM Channel</a>';
	} else {
		$isNext = true;
		$abap_bbmchannel_id='<a  rel="me nofollow" href="' . $abap_bbmchannel_id . '" target="_blank">BBM Channel</a>';
} else {

	if($isNext) {
		$abap_bbwvendor_id='&nbsp;&#8226;&nbsp;<a  rel="me nofollow" href="' . $abap_bbwvendor_id . '" target="_blank">BlackBerry World Vendor Apps</a>';
	} else {
		$isNext = true;
		$abap_bbwvendor_id='<a  rel="me nofollow" href="' . $abap_bbwvendor_id . '" target="_blank">BlackBerry World Vendor Apps</a>';
} else {

And then adding those output display values to the content values that is returned and displayed.

$content.= ($author_box.$abap_email_info.$abap_skype_url.$abap_facebook_url.$abap_twitter_url.$abap_linkedin_url.$abap_google_url.$abap_youtube_url.$abap_flickr_url.$abap_pinterest_url.$abap_instagram_url.$abap_quora_url.$abap_bbwvendor_id.$abap_bbmchannel_id.'</p></div>');

I sent the full code change to the plug-in author in hopes that he would include my new fields as a thank you for fixing a bug in his plug-in. Obviously, if he doesn’t keep the fields and updates the plug-in, then I will have to edit the plug-in file again to add my code. Having that flexibility is one of the nice things of WordPress.

If I am still using this plug-in, from now and into the future, you should see the results below.

CubiX Review

by DeanLogic Z30

As a member of an app developer group, you have the opportunity to hear of an app that you might not find looking in an app store. I usually try to help test the apps from the Baby Steps: BB Dev group before they get to the app world, but I didn’t have the time during this app’s development. Now that it is launched, I took the time to download it and give it a look.

Cubix on BBW

CubiX is a side scrolling time touch game. In other words, a game that requires the user to touch the screen at the right time for the right amount of time in order for the player piece to keep advancing. The game was built using Unity, which they make you proudly display on the splash screen.
Game Warning

The second splash screen displays a warning to those who might suffer from epileptic attacks. So, take heed.

Because, welcome back to the 1980’s!

Now, I love the 80’s and pretty much wish to relive the glory of my youth. Hot pink and bright colors are part of the 80’s and all of this game. It might make the game a little hard to read, but you can’t complain that the user interface is boring.

Once you get past the start you are on to the first level. AgeTDev (aka Tom) has added a little help for when you are getting started with the game. That’s a good thing, because when he was looking for testers he wanted

users who would be okay with doing 70 attempts before passing the first level

Consider yourself warned.

As mentioned, the game play is that you tap the screen to make your hot pink cube jump to avoid or purposedly land on objects. Flat objects are good, as long as it isn’t the water. Pointed objects are bad. When you jump, the hot pink cube will rotate, allowing for more interaction with obstacles as you scroll along.

On the first level, there are pauses to help you learn the game, which make it feel like you are entering a slow motion round house kick. And when you fail, the screen zooms in on your complete failure to give you the feeling that you’re crashing off of a cliff. A couple of nice touches to the game.

It only took me 30 tries to complete the first level. The first pack of levels is free, with 2 unlocks.

The second pack is an in app purchase. In app purchases have been a hot topic in the developer group. We are always trying to figure out what is the best way to get monetary reward for our efforts, yet encourage people to try our apps. If you join AgeTDev’s BBM Channel (C003CC64C), he is planning to give away the 2nd pack. Also, you’ll get updates on when other level packs will be available.

CubiX is a fun game and falls into the easy, but hard and addictive  category. If you need something to brighten a boring day, then this is definitely the game you need to download.

Check out CubiX in BlackBerry World! You can find it at