Over the last little bit, I’ve been doing a lot of work on some apps for BlackBerry 10. With January 30th fast approaching, I was coding like a madman to try and meet the deadline, so I can get my hands on some awesome swag.

I was able to pump out two good quality apps relatively quickly by using the Tart project from the blackberry-py project. Thanks to Peter Hansen (@peter9477), we can write entire apps using just Python, QML, and JavaScript that perform at near-native speeds. This workflow allows you to rapidly prototype your app, far outweighing any concerns about performance when compared to C++.

One of the apps I built uses a UI paradigm called “Pull to Refresh.” If the user is viewing a stream of data, they can pull down on the list and reveal a hidden item that notifies them they can refresh the stream contents by releasing their touch. A number of people have asked me how to implement this.

Again, because of the speed of development that’s possible with BB Tart, I was able to put together a crude, but workable sample demonstrating how to implement this feature. Furthermore, I even integrated it with ADN’s global feed. I simply pulled a couple of libraries from Github and putting the building blocks together. I went from idea to functioning sample in 12 hours, with 6 hours of sleep in between.

As you can see, everything you need is in the blackberry-py-pulltorefresh GitHub repo. The app was built on top of my blackberry-py-bootstrap repo. I’d be more than willing to accept help/pull requests on the project to help improve it for all developers. The file you should look at in particular is PullToRefresh.qml.

You’ll note that I implemented a LayoutUpdateHandler to monitor changes in the item. If the Y-coordinate is equal to exactly 0, then it fires the refreshTriggered() signal. In my testing, this works relatively well since the control will snap to 0 when it is released past the threshold. However, it can sometimes be triggered while the user is still interacting with the control. Therefore, a better way would be to detect if the user is touching the control, and only firing if they’re not.

I hope that helps most of you BlackBerry 10 developers looking to implement this in your app. When I first got this working, I couldn’t stop playing with it! Hopefully this gives you the jumpstart you need. Oh and take a look through the rest of the repository, there’s some good stuff in there including a way to asynchronously load remote images.

Google Chromebook and Ubuntu

Sun 16 December 2012 by Xitij Ritesh Patel

I got my Google ARM Chromebook!


I was really excited for this device. I’ve been using a thick, heavy, and relatively underpowered Acer laptop for the last 5 years. I really wanted something thin and light to do my development work on that I could use on the go ...

read more

Migrating to Amazon EC2

Sun 02 December 2012 by Xitij Ritesh Patel

I’ve been pining over the Google Chromebook lately, as I’ve been wanting to become more mobile with my developer setup. In an effort to make this a reality, I started looking at my options for a VPS.

I currently have two VPSes running, one with prgmr and one ...

read more

Why I Like BlackBerry 10 and Why I Don’t Hate iOS/Android

Tue 27 November 2012 by Xitij Ritesh Patel

Some of you may know that I do quite a bit of development work. I’ve consulted on a number of projects through my company Pulsecode and more recently, I’ve worked on bootstrapping my own startup, taab. In my endeavours, I’ve been exposed to a number of platforms ...

read more

Low-carb Keto-friendly Gluten-free Peanut Butter Cookies

Tue 27 November 2012 by Xitij Ritesh Patel

Having lost a few pounds, I felt the desire to indulge a bit. I haven’t been counting calories for the last few days, but I’m intending to start again tomorrow. Normally, I don’t have room in my calorie allowances to eat keto-friendly desserts, but I decided to ...

read more

Hacking My Health

Tue 27 November 2012 by Xitij Ritesh Patel

I am a hacker. Always have been, and always will be. It’s no wonder that I went into engineering. It’s also no wonder that I am taking the same approach to fixing my health.


I am overweight. I was 216.6 lbs about 3 weeks ago. At ...

read more

Building a FreeNAS Box

Sun 25 November 2012 by Xitij Ritesh Patel

I’ve been having a lot of trouble lately trying to figure out the best solution for backing up my data. Recently, I’ve been accumulating a large number of files, photos, and videos that I’d like to keep safe. Moreover, I’d like this data to be accessible ...

read more

The Entrepreneurial Spirit

Sat 24 November 2012 by Xitij Ritesh Patel

I’m what many would define as a serial entrepreneur. I work very hard on my own ideas and projects. Over the last year, I’ve had varying successes with Desktop Bridge, contract work via Pulsecode, and developing the concepts for taab. In this last year, I’ve made a ...

read more

Compiling tesseract for BlackBerry 10

Wed 21 November 2012 by Xitij Ritesh Patel

I’ve been on a hiatus from the blog for some time, so I figure I’ll write something up that should be useful to a few people.

Recently, I had an idea for an app, and part of it would utilize some OCR capabilities. Some quick Google searching revealed ...

read more

Conference Call with RIM

Thu 14 June 2012 by Xitij Ritesh Patel

I mentioned at the end of A Desktop Bridge Too Far that I had participated in a conference call with RIM about many of the concerns that I had raised. I’ll try to summarize what was discussed.

Communications Issues

When Desktop Bridge was first submitted, it was reviewed by ...

read more

Signing up with prgmr

Wed 13 June 2012 by Xitij Ritesh Patel

I’ve used several different VPS providers in the past. My first experience was with Slicehost, with whom I was happy with until about 1.5 years ago. I decided that I was fed up with their lack of competitiveness against other providers.

I switched to Linode, which I use ...

read more

A Desktop Bridge Too Far

Tue 12 June 2012 by Xitij Ritesh Patel

The image above is a screenshot of the e-mail I received at 11:30am on Tuesday, May 29, 2012, approximately 1.5 hours after I had launched Desktop Bridge. It effectively killed two weeks of effort to launch a product from start to finish. I lost the opportunity to measure ...

read more

Results of Launching Desktop Bridge

Tue 12 June 2012 by Xitij Ritesh Patel

If you don’t know what Desktop Bridge is, the YouTube video above should help illustrate what it does.

Many of us have likely have had an idea similar to Desktop Bridge. I’m sure many of you have thought that it would be great to access your phone’s ...

read more

PySide on the BlackBerry PlayBook

Thu 24 May 2012 by Xitij Ritesh Patel

Since BlackBerry 10 Jam, I’ve been spending a lot of time doing development on the BlackBerry platform. Most of it has been related to my efforts at taab, but this past week, I decided to tackle something new on the BlackBerry PlayBook.

If you’ve been keeping up with ...

read more

Achievement Unlocked: M License

Tue 15 May 2012 by Xitij Ritesh Patel

After nearly 2 years of riding a motorcycle, I’ve finally obtained my M license! It was a bit of an ordeal, since I had not taken the Green Goblin out of hibernation at all, even with all the gorgeous weather we’ve had. I simply didn’t have the ...

read more

Updates & I picked up a new toy!

Tue 24 April 2012 by Xitij Ritesh Patel

So I haven’t got too much work done in the last few days, due to having come down with a bit of a cold. It’s not that bad, but it’s right in my sinuses, so my eyes and nose are always watery. Makes it difficult to concentrate ...

read more

Let’s try this again

Sun 22 April 2012 by Xitij Ritesh Patel

I’m setting up my blog, once again. I’m going to do my best to make it stick this time. For now, I’m off to bed. It’s 6:30am. I need to stop doing this.

read more
Fork me on GitHub