nov 18

Develop once, display everywhere!

Beside your casual WebSite, you may want to develop a proper Mobile Service.

Whilst on one hand you first need to think what sort of usages you want your visitors to do with this dedicated service, on the other hand you have to bear in mind your content will be displayed through different technologies, WebBrowser etc.

Even though you’ll have developped something with an amazing look and great features, you will also soon experience some technical issues essentially due to the wideness of devices used to access your pages.

Mobiles currently in circulation (Backelite sources)

Then first question: Do you want your content to be accessible from any sort of devices one could be using?   In other words, while you want your Mobile Website to look amazing over a new generation of devices such as an iPhone, how are you going to downgrade your Mobile Site for the older devices? What about next generation? How will you anticipate mobile phone industry innovations?   On the left side is a figure which talks by itself… New generation mobile phones are much more used for browsing, however, many of cheaper handsets are still in circulation.   As you can figure out here, there still are loads of different sorts of devices currently used. And for each familly you will have to think about the best solution to suit devices specifications and capabilities.   Sounds like a huge work doesn’t it?  you definitely want to provide former handsets which may have been the big sale at its time with information too. While developping a page per type of devices would be way too much work especially if you want it to stay up to date, BkRender, our solution we’re providing you with, consists of developping a single page in BKML and then:   let BkRender optimize the rendering over up to 6.000 handsets so far! Else, you may want to consider learing dozens of technologies to be able to render your Mobile Site everywhere properly…   With BkRender, there is nothing you’re going to need to learn furthermore than what you already know.   Here are two examples of a pretty basic page as a first step and then a more complex page, with some examples of rendering for the 3 devices famillies.

Continue reading »

Tagged with:
nov 09

The dreaded word: « Fragmentation »

With today’s rapid adoption of the Android platform, more and more articles on the web have been dedicated to the supposed « fragmentation » of the OS. Dan Morrill wrote a great post on this topic (even if he prefers talking about compatibility, and I agree with him). You can argue on the terms, but even Dan Morrill admits that there are issues that developers must solve to reach as much users as possible on the Android market. Some of the biggest are:

  • The several bugs of Android 1.5 Cupcake. This is the biggest « compatibility » problem in my opinion, but I would advise you to drop this version as it represents less than 8% of the devices according to Google.
  • The diversity of screen sizes and densities
  • The bugs specific to custom Android interfaces (such as HTC Sense)

So what do we do?

The obvious answer is: testing, testing, testing.

Alright, testing is the solution. But if you are a developer, you will probably tell me that deploying on several Android devices is painful, and that you do not have time for that (because you are so busy developing the new killer app for the Android Market). Here at Backelite, we totally understand you. So here is an attempt to ease the deployment process on several Android devices (either real ones or AVDs).

Our solution: BkDroidTester

This solution is simple, yet quite powerful. It is basically an USB Hub (optional), and a few lines of shell script to automatically deploy an app on several devices (thanks to Cyril Siman for the original idea).

The hardware part (optional)

To connect several Android phones to one single computer, without having any alimentation trouble, the obvious solution is to use an AC-Powered USB Hub.

We went a little further with a complete test bench composed of a metal box, an USB Hub, and several universal cell phone holders. One of the benefits of this approach is to have a single USB cable (the one between the computer and the hub) to plug in and out (for example to quickly give the test bench to a colleague).

Here is a schema of the system:

And here is a picture of the final result (some people call it « the octopus »…):

BkDroidTester picture

The USB Hub is obviously inside the box, and the painted metal provide a great surface for the suction cups to hold onto. We decided to go with 3 mini and one micro USB for the plugs. You can use a converter if you need to use a mini USB plug with a device using micro.

The software part

We developed two small scripts that you can also use without the hardware part described above (just plug several devices to your computer and/or launch several AVD).

The scripts list all the android devices currently connected, and deploy the specified app on them all through ADB shell. More precisely, they make use of the following commands:

adb devices
adb -s <device_number> install -r <path_to_apk>
adb -s <device_number> shell am start -n <package_name>

Now let’s see how to use those scripts.

Step 1: Download the scripts
To use BkDroidTester, you first have to checkout the scripts available here. There is one to deploy an app, and one to deploy and launch a monkey test.

Step 2: Plug in the devices
You just have to connect one or more devices to your computer and/or launch AVDs (make sure all the devices are recognized using ADB).

Step 3: Configure your IDE
If you do not want to launch the BkDroidTester scripts through command line, you can integrate them directly in Eclipse or any IDE that allows you to configure external command line tools.

Here is the way to do it for Eclipse :

  1. Select ‘Run > External tools > External tools configuration » or clic on the arrow next to this icon and select « External tools configuration »
  2. Select « program » and press the « New » button to add a new external tool
  3. Then, configure like this:
    1. Name: <the name you want>           example: « MyApp – Deploy on all Androids »
    2. Location: <path to one of the scripts (deploy or monkey)>          example: « /Users/FabienDevos/work/BkLabs/BkDroidTester/deployOnAllAndroid.sh »
    3. Working directory: <path to the APK>           example: « ${workspace_loc}/MyApp/bin »
    4. Arguments: <APK name> <package name>/<first activity with package name> example: MyApp.apk com.me.myapp/com.me.myapp.MyActivity
  4. You can then launch the script by clicking on the arrow next to the icon  and choosing the script you just created (you can also configure Eclipse to launch the last used script by clicking the green icon)

The screenshot below sums it up:

The configuration is almost the same for the « monkey » script. It needs one additional parameter at the end: the number of events you want to send (eg: 5000). You also have to remove the name of the Activity: MyApp.apk com.me.myapp 5000

Pending improvements

So that’s pretty cool, but it could be a lot better. Here are a few features that we would like to add in the future:

  • Android Manifest file parsing to automatically determine some parameters like the package name (and thus avoid passing them as arguments of the scripts)
  • Automated cleaning of preferences or caches to have a clean fresh app each times you deploy

But as Android developers, we do like the culture of Open Source, which is why we are releasing those scripts as an Open Source Google Code project under the Apache license 2.0. Feel free to use or modify it, and if you do modify it, do not hesitate to share your improvement!

I do hope you enjoyed this article. If you have any feedback, you can either write a comment here, or submit bugs/requests on the Google Code project page.

Fabien Devos
Android engineer at Backelite

Tagged with:
juin 25

This post will focus on animations. While Silverlight is a very capable technology for creating rich user interfaces, Windows Phone 7’s UI languages, codenamed Metro, has very strong red threads and principles which push typography, panoramic navigation and animation. One might find the experience a bit bland at first, but it really comes alive when one sees the UI in motion. A post dedicated to Metro is planned, but for now I suggest you read these nice articles.

If you base your design principles on Metro and try to embrace the design of WP7’s default applications, you will want to animate parts of your UI on actions or based on a timer.

Continue reading »

juin 24

Have you ever wanted to demo your apps on the big screen, just like Steve Jobs does in his famous keynote speeches? Up until recently, this wasn’t possible to do without jailbreaking your iPhone. Starting in iPhone OS 3.2 and iOS 4.0+, a new set of public APIs exposes the dock connector’s ability to interface with big screen TVs and PC monitors. You can either use the composite / component AV cable or the new VGA dongle accessories to connect to an external display.

Continue reading »

Tagged with:
preload preload preload