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( 'https://twitter.com/'.$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.

if($abap_twitter_url)

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($abap_skype_url){
	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 {
	$abap_skype_url='';
}

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($abap_bbmchannel_id){
	if($isNext) {
		$abap_bbmchannel_id='&nbsp;&#8226;&nbsp;<a  rel="me nofollow" href="http://www.pin.bbm.com/' . $abap_bbmchannel_id . '" target="_blank">BBM Channel</a>';
	} else {
		$isNext = true;
		$abap_bbmchannel_id='<a  rel="me nofollow" href="http://www.pin.bbm.com/' . $abap_bbmchannel_id . '" target="_blank">BBM Channel</a>';
	}
	
} else {
	$abap_bbmchannel_id='';
}	

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

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 http://appworld.blackberry.com/webstore/content/55551887

Meetup for BlackBerry 10 release 1.1.3

by DeanLogic

I just got the update 1.1.3 for my Meetup for BlackBerry 10 app in BlackBerry World. I didn’t put in all the changes that I wanted to, mostly because of issues that came up while I was making the upgrade. Beyond my computer having problems, Meetup had a DDoS attack, which brought the app down for over a week. Unfortunately for my app reviews, a few people downloaded the app during that time and couldn’t get the app working. Because of that, I decided to release the app with what I had changed and then start another version with some more changes.

In this release, I added event chat/discussion. Event chat/discussion is where people can make comments about the event before and after the event. Usually this is helpful when people are planning things before the event. It is somewhat helpful for the Organizer when people leave reviews after the event. To get this to work, I modified a ListView to look like a chat screen.

Event Chat

Event Info

Event Info Menu

I also updated the App Settings menu. The Privacy Policy and Change Log now open in a WebView instead of opening the browser. I also added some text about joining the BBM Group for app support and subscribing to the DeanLogic BBM Channel, with a button to open the channel. Adding the channel was a little more work than expected, because when I ran the app on my phone, the BBM Channel would automatically open up. I used a tip found on the Internet to check to see if the uri was added before triggering the Invoke. Then I just add the uri when the button is pressed.

Unfortunately, I couldn’t get Join BBM Group to work. Apparently there are still some bugs in that with the API or maybe just general inability to do so or something. I think it will be fine for people to join the Channel, because the Channel does offer chat.

actions: [
                    ActionItem {
                        id: aiBBMChannel
                        imageSource: "asset:///images/Channel-d.png"
                        title: qsTr("DeanLogic Channel")
                        ActionBar.placement: ActionBarPlacement.OnBar
                        onTriggered: {
                            bbmChannelInvoke.query.uri = "bbmc:C004DD717";
                            bbmChannelInvoke.query.updateQuery();
                            bbmChannelInvoke.armed();
                        }
                    }
                ]
 attachedObjects: [
Invocation {
                        id: bbmChannelInvoke
                        query {
                            invokeActionId: "bb.action.OPENBBMCHANNEL"
                            invokeTargetId: "sys.bbm.channels.card.previewer"
                        }
                        onArmed: {
                            if(bbmChannelInvoke.query.uri != "") {
                                trigger("bb.action.OPENBBMCHANNEL")
                            }
                        }
                    }
]

App Settings Menu

App Support Form

Cascades and auto animation

by DeanLogic

While I am trying to work on the next release for my Meetup app, I decided to take a little diversion to make a simple game app. Well, simple game app has taken a little bit longer than expected, but while working on the code, I learned a little unexpected feature about Cascades. When you want to place an item in a Container, you can let the Container handle the placement, or you can set the X and Y coordinates for the control (which is a subclass of a VisualNode). The values to set are the TranslationX and TranslationY, which doesn’t sound like something for setting coordinates, but more to do with language. If you set these values and do nothing more with the control, then nothing in particular will happen. However, if you set the values in a way to place the control outside of the visible area and then later set the values to be in the visible area, then you will see an animation happen.

In this video, the buttons move to the end point (on or off the screen) when triggered. I used my video camera pointing at my computer monitor. So the quality is not the best.

In this video, I move a Container and everything in it to a spot in order to hide the gaming board. Because I used a Java based web screen capture, not all the frames are captured, so it is hard to see the animation. But, in real time, the Container slides up to cover and down to uncover the play area.

The quality of the demonstration goes back to the annoyance that Adobe Captivate is not part of Adobe Creative Cloud. I was thinking about putting How To videos with my apps using Captivate. I will probably have to figure out how I can do it using Edge Animate.

Fly FLy Up Testing and Review

by DeanLogic Z30

As part of being a developer you end up spending some time in developer forums. Usually those forums are part of the official site for the development tool or application. But, sometimes you end up in a fan forum that happens to have a developer forum of its own, like the one on CrackBerry.com. And sometimes when you want to find an active group of new developers, you end up in a BBM Group for new developers called Baby Steps: BB Dev.

Well, that’s where I found myself when a user named Tom asked for some help. Tom was dipping his toe into Unity for BlackBerry 10. And apparently one of the issues with developing is not being able to know for sure if the app will work on all the devices. Luckily for Tom, he was in a group that had users with Z10s, Q10s, Q5s and one guy had a Z30. I am that one guy.

For testing, Tom chose the route of sharing his updated bar file with the group testing his app. I used vnBb10 to side load the app for testing. It took several revision to get to the released version, but it was fun getting there.

FlyFly Up BlackBerry World

Fly Fly Up is a color matching game. Which means, the player selects a color to match a color presented in order for the game to continue. What you want to do in Fly Fly Up is to keep the red ant, Elliot, flying up and up on his jet pack that indicates your selected color. The premise is simple and the game starts out easy, but if you are a little slow on the finger press, the game gets hard quick.

“Touch quickly. Touch softly. Touch only when necessary. ” – Lloyd Summers

Sage advise. The game is addictive because you want to do better and better to beat the high score.

Check out Fly Fly Up! in BlackBerry World! You can find it at http://appworld.blackberry.com/webstore/content/49730421