Sugar on Android

Web activity on Android

Currently there are several manual steps that need to be executed in order to create a web activity for Android. When things stabilize the process can be automated, ideally we would enhance the command to build an Android application package file (APK) ready for distribution and installation on a device running Android.

The APK could be built using the android sdk and after that, an APK would appear in the activity dist/ directory.

Activity icon

Android stores app icons in different sizes: : 512x512, 144x144, 96x96, 72x72, 48x48 . For details see

To convert an SVG icon to a PNG suitable as a launcher icon you can use the 'convert' command from

Android project

Make an Android app with one inside, which is the default project the IDE creates. See

For the icon, select the converted PNG icon in the Activity icon section above.

Copy all the web activity contents to the assets directory. You can copy the boilerplate and adjust from

Android shell

Here is an Android project that contains a bound service to which other apps can bind to: This service needs to be separated in its own app. The important bits are:

An activity launcher for Android shell

In Android is possible to replace the default launcher. A launcher is basically a normal app, that has an Intent with a category CATEGORY_HOME.

Being a normal Android app, it can be a web activity. And it would be possible to put colors to the launcher SVG icons and organize them in a spiral, just like the GTK Sugar home.

There is a Home screen replacement sample in the android-sdk samples. It can be built and installed as any other app, following the steps at

Debugging web activities on Android

To get the inspector in your web activity using Chrome, see Remote Debugging on Android.