Tooleap and B4A Part 3: Installation of Tooleap library and Application setup

The following library files need to be in your AdditionalLibs folder (these are all available in the B4A forum post here):

  • TooleapHelper (both jar/xml)
  • the latest tooleap sdk jar (current is tooleap-sdk-0.9.4.jar)

Before we start we need to make some manifest changes to the Application level.

These lines need to be added to your manifest editor:

For permissions:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.GET_TASKS" />)

For Tooleap’s internal services:

<service android:name="com.tooleap.sdk.TooleapAppService"/>
<service android:name="com.tooleap.sdk.TooleapUIService"
                <action android:name="com.tooleap.sdk.BIND_UI_SERVICE" />
<receiver android:name="com.tooleap.sdk.TooleapReceiver">
               <action android:name="android.intent.action.PACKAGE_REPLACED"/>
               <data android:scheme="package"/>
               <action android:name="com.tooleap.sdk.TOOLEAP_ACTION"/>

Once you add these you are ready to start writing your Tooleap Activity/MiniApp.

Tooleap and B4A Part 2: Introduction to Tooleap

This is the first in a series of posts to explain how to use Tooleap with B4A.

You should sign up with their early access / beta program at: . They have very good documentation on site, and great support.

What you will need:

  • B4A 3.80 (may work with earlier version with some limitations)
  • Android SDK 2.2 (Version 8) and above.
  • the tooleap sdk jar (available here or from
  • the Tooleap Wrapper libraries I wrote available here
  • an API key from Tooleap developers Key Management page to publish/release an app

That is all.

You can make any activity into a TooleapActivity and it can run in either normal mode or in miniApp mode. You can have multiple instances of the same activity in miniApp mode.

The Tooleap Wrapper libraries contain 3 classes:

  • The TooleapManager class. This is used to manage the miniApps and can be used to add, remove or update the miniApps.
  • The TooleapMiniApp class. This is used to initialize and set the properties for the actual miniApp itself. This includes notification properties and app type etc.
  • The TooleapActivityHelper class. This is used with the Activity itself with some useful functions to find out whether the activity is in miniApp more or normal mode, or to find out its AppID.

Testing and Releasing a Tooleap app

You can test a Tooleap app without an API key. In order to do that you have to sign your apk with the debug certificate. In the B4A IDE go to Tools > Private Sign Key, and then select Use debug key at the bottom. You will be able to test the tooleap app, but remember you cannot release your app on the play store with a debug certificate.

For API keys, tooleap is still in early access mode, you first need to join the it using this link:

Once you join the program, you should be able to generate API keys. A tooleap API key is related to yourpackage name. To generate your API key go here:

Then, put in your package name and it will return an API key for you. This page also lists all your API keys.

Once you have your API key, you need to add this line in your manifest:

<meta-data android:name="com.tooleap.sdk.apiKey" android:value="YOUR-API-KEY-HERE" />)

Also to note some extra information:

  • The Tooleap SDK uses the internet permission. The miniApps have a searchbar (Google) bundled with them that requires this permission and allows users to search google from any miniApp. The SDK may also collect some analytics for further optimizations.
  • TooleapMiniApps at the moment at 80%x and Activity.Height-105dip. I am trying to find out a way to get the width and height after layout is measured, but it is not such a big issue. It is best not to use Dialogs/MsgBoxes with miniApps.


Tooleap and B4A Part 1: Introduction

I came across a pretty cool SDK called Tooleap. In their words:

Tooleap is an Android SDK which brings your app to the forefront
of a user’s device screen with a floating (always-on-top) UI,
thus creating a unique multitasking experience and increasing
your app’s availability and usability.

From what I understand Tooleap functionality consists of two parts.

1. A rich floating notification. This can notify the user of new data, or just be available to interact with from anywhere.

2. MiniApps, which are a slide-out window providing the same functionality of a usual activity, without losing context of the previous activity.

After reading their SDK I didnt think we would be able to use it in B4A since it required us to subclass Activity which we never had been able to do before, but Erel gave us a lifeline and now we are able to subclass Activity, thus being able to use this SDK.

I wrote some thin Java wrappers to get the functionality into B4A.

Dim TooleapManager1 As MSTooleapManager
Dim TooleapMiniApp1 As MSTooleapMiniApp
Dim TooleapActHlper As MSTooleapActivityHelper




Chromecast: Understanding its Potential beyond Video Streaming

This article discusses how to create web applications with the Chromecast using js

The EWD Files

Google launched the $35 Chromecast into the US market in July 2013 and it became available in the UK in March 2014.  It’s primarily marketed as a device for streaming video to your TV, and, as such, is usually compared with the Roku streamer, Apple TV and the new Amazon Fire TV.

Once you look under the covers, you discover that such comparisons are misleading: unlike the other devices, the Chromecast is actually much more than just a streaming device for TV.  This became clear when Google launched their Software Development Kit (SDK), allowing developers to build their own custom applications for the Chromecast.  Having had my hands on one since almost the day they became available in the UK, I’ve come to think that it’s one of the most exciting and interesting devices of recent times, and I believe it has huge potential within many market sectors…

View original post 1,735 more words

IFTTT Android App lands on Google Play Store! Get ready for some unique Android related recipes

I’d love to check this out. This is Tasker with Webhooks!


IFTTT fans! It?s a great day for us. IFTTT has released their official Android app on the Google Play Store. IFTTT or If This Then That is a free service that lets you connect various web applications together through simple conditional statements.

IFTTT Android App

IFTTT Android App

Users can create unlimited ?recipes? from nearly 100 different web services including social networks, cloud storage products, sharing services, sports score providers and Android as well as iOS related channels, etc. IFTTT has been praised by a lot of tech experts and publications such as Forbes, Time, Wired and the NYTimes.

IFTTT Android App Screenshot

IFTTT Android App Screenshot

You can use it to duplicate files between Dropbox and Google Drive or send a text to yourself when it is going to rain. IFTTT for Android allows adding even more Android related channels such as location, SMS, notifications, calls and photos. You can use these new channels in collaboration with…

View original post 43 more words

Remote control for ChromeCast

So while using (and being impressed) with my Chromecast, I have found one thing missing in the whole user experience. A remote. And possibly a unified remote. While controlling the cast from the phone is not too bad, trying to pause/resume it from the PC is a right nightmare.

I did some research and digging on how to write a Chromecast app for this purpose. Using the Google Cast API I found it was possible to join the current application (without a session id) and also control it using a RemoteMediaPlayer object. This seems to work great on standard apps written with the release Google Cast SDK. I tried on LocalCast and Cloudcast and I was able to control their streams (maybe they use a standard receiver).

However with other apps like Youtube and Vevo this method does not work. This is a major disappointment to me, since I expect all apps to use the same SDK and standard commands. I believe Youtube has been on its own preview SDK and I am not sure about Vevo, maybe they have a non-standard receiver. Nevertheless I expect all receivers to atleast conform to the same standard media playback commands.

Automated regression testing of Chromecast using Cucumber, JRuby and Rukuli

This is really cool!

a little place of calm

As you may know, i work as a Developer In Test for Media Playout at the BBC. We enable audio and video playout on the web (desktop, tablet and mobile) using our Standard Media Player.

We recently added support for Chromecast, and i want to write a bit about how i automated testing for it.

Chromecast HDMI dongle Chromecast HDMI dongle

Chromecast is a HDMI dongle that plugs into a normal television and adds connected TV functionality. The neat thing is you can control it from your laptop, tablet or mobile using the media apps that you already know, such as YouTube, Netflix and now BBC iPlayer. Google also provides an API so that new Chromecast apps can be written all the time.

So how do you test a Chromecast? Well, personally i like to test things from an user’s point of view, actually clicking things and observing what happens as a result…

View original post 1,038 more words

NowTV / Roku2 to stream local media

The NowTV box can be had for only £9.99, a price virtually impossible to beat.  It is a rebranded Roku2 which normally goes for £40 so pretty sure Sky is making a loss on selling the devices, but they probably cover it up in subscriptions.

However, what I am interested is how good a local network streaming box it is.  Not interested in the subscriptions or web apps. For this reason my review is partially of the box and partially of Plex, the app used for streaming.


The interface is clean and uncluttered. The navigation is fast. The remote is very good. While initially I had issues connecting via WiFi I later realized that I was actually connected and getting wrong messages for some reason. The menus are quite interesting, and things look very nice on the usability side. You can even download the Roku app and use that as a remote, however nothing beat the laid back couch slopping feeling of being able to use the remote control.

The remote is simple, I would say missing some descriptive buttons, but once you figure it out, it is very smooth.

Very rarely did I find myself stuck somewhere where the box would not respond immediately. This was usually on single-threaded operations like buffering etc, but eventually it would come back.


The box I got from a friend already had Plex installed on it. To stream media from a PC or NAS or even mobile you need to sideload either Plex or XBMC (cannot do both) on to it. I am not aware of the gory details of that but once you are past that stage you need to install Plex (or XBMC) media server on your PC, point it to your media and you are ready to go. I wont say I liked the Plex interface on the box, but it does work fine.

Also, you can download the PlayTo Roku app on your (Android phone) and stream videos from your phone to the box too which seemed to work great too.


Now remember this box supports 720p, which is fine especially if you are streaming over a wireless network. When streaming higher quality/higher bitrate videos, Plex would transcode the video to lower quality. This puts the media serving PC under pressure, and also increases the buffering time by quite a lot. So from pressing Play to seeing the video on the TV it may be a full two minutes or more (depending on how spiffy your PC is, and remember Plex does not use QuickSync). Usually this is fine, if it just happens at the beginning of the stream, however if you skip forward or rewind, this means that you will face more loading/buffering times, which can be rather annoying if you missed a single dialog or so forth. The limiting factor is probably the limited storage on the device that cannot keep the buffererd stream for a long time.

On lower quality/bitrate videos there were not many issues and it works great. I do wish Plex gave more information about the video like video and audio codecs used so I could make better comparisons.

Anyway I was quite happy with the £9.99 device, it works surprising well and lag free most of the time. The hardware isnt exactly zippy, but not laggy either. Streaming Youtube and TED was spot on. You are limited to the apps on the Roku store though, and further limited I believe as Sky blocks some more apps on the Roku store to promote its own subscriptions. Consuming less than 2W on streaming, and with a very handy remote pretty impressed.

Getting media on the TV : Stage 0

Ever since moving home I have been struggling to get my media and movies on the TV. Previously they were so close so I used a long enough HDMI cable for great results.
These days I have been confused as there are very few solutions that properly allow to stream movies from a PC.
So I got to test 2 devices today. Can’t say I have played with them thoroughly yet.
One is the NowTV box which is extremely cheap. It is a rebranded Roku 2 LT I believe. However I failed to get it to connect with my network for some reason. It simply cannot access the local network.
The other device was a Raspberry Pi running OpenElec. Surprisingly fast although I had heard they are slow with xbmc. While I got it on Ethernet and connected the android xbmc remote app I didn’t figure out how to connect it to my PC. I guess I need to install the server there so will play with that later. My power lead however was coming loose on every movement causing a reboot. Also my wireless usb mouse worked for a few minutes and then refused to work after that.
Well, a lot more testing is needed until I get my Chromecast.

Devs have to eat too

I just came across this very interesting link from Chris Lacy the developer of Action Launcher and Link Bubble. Infact I have seen this comparison elsewhere too, and thought about it 100 times but I feel like posting this here now. Have a look at the comparison between a movie and an app here.

Also, after he published Link Bubble (which is a pretty sweet app by the way), here is his justification for his pricing and how it is done.

I do agree with him on many points here. These days I see people’s sense of entitlement way too high, and especially from mobile devs. Probably this is the generation that had to resort to piracy for one reason or the other and are now unable to justify even the $5 price on an app that they like.