sunnuntai 2. helmikuuta 2014

Hydra for Sailfish progress

Many of you may already know about it, but let's make this official. Hydra is being ported to Sailfish. I don't have an ETA just yet, but I can give you some sense of the work involved and the current progress on it. Currently the biggest challenge seems to be the web layout engine used by Sailfish QML components, more specifically Webkit's version 2. On MeeGo, Webkit version 1 was used, but Sailfish strongly discourages use of that (it is forbidden for Harbour application store) and this is understandable due to the newer version being significantly better in performance. The drawback is that due to the improved multithreaded architecture of Webkit2, interaction with controlling application is very limited.

Known limitations of Qt5's Webkit2 implementation:

  • Web storage (including cookies, web storage and web sql, but excluding preferences) is stored between web applications, posing a security threat
  • Web access cannot be controlled, i.e. all web applications may access any URIs without restrictions
  • Synchronous JavaScript platform APIs are challenging/impossible due to not being able to invoke C++ code synchronously
  • Web application folder based localization is not possible (always reverting to default language)
  • Unable to change user agent string of the web interface, possibly resulting in denied access to Firefox Marketplace (working to overcome this somehow..)

Current overall progress with the Sailfish port:
  • Core functionality port to Qt5: Done
  • Sailfish manager UI: Ongoing (~70%)
  • Sailfish web application UI: Ongoing (~50%)
  • Sailfish cover view supporting minimized web application: Ongoing (~50%)
  • Refactoring Widget API to work with Webkit2: 0%
  • Refactoring platform APIs to work with Webkit2: 0%
  • Reintegrate Cordova: 0%
  • Rewriting Firefox OS config parsing: 0%
  • Multiprocess support via D-Bus: 0%
  • Update embedded widgets for new resolution and feature set: 0%

tiistai 19. marraskuuta 2013

Going multi-platform

Lately I've been busy doing a major overhaul of the Hydra code base in order to better support multiple target platforms. I wanted to share a glimpse of the progress with you, in form of the screenshot below.

Hydra running Google Maps web application on Windows XP.

And no. There won't be a Windows version release of Hydra (at least in the near future). This is merely a proof-of-concept that the same code can be architecturally modified into working on two as different platforms as MeeGo and Windows.

The real goal of the ongoing changes are, of course, to enable porting Hydra to other mobile platforms with Qt support. Guess which comes first!

perjantai 13. syyskuuta 2013

Firefox OS apps have just landed on your N9 for free

Good news for everyone who has been waiting for the free version of Hydra to support Firefox OS applications. Version 1.4.3 is now out and available via Nokia Store. It has all the same features as the PRO version (except for encryption) that has been out for a couple of weeks now. If you like Hydra and want to be among the first to receive new features, please consider buying the PRO version to support the ongoing development.

To install web applications from Firefox Marketplace, you must use the bundled Marketplace application. If you are interested in using HERE Maps provided by Nokia, you can find an installation shortcut from the bundled Feature Demo application (the app is no longer directly available from Firefox Marketplace!).

Screenshot of Nokia N9 application launcher with some web applications installed.


maanantai 27. toukokuuta 2013

Version 1.4.0 has arrived

Version 1.4.0 of Hydra widget platform (PRO) is now available from Nokia Store! Besides the improvements for packaged Firefox OS applications described in my previous text, it introduces a very significant usability boost by changing the default device-pixel-ratio from 1 to 1.5. In practice this means that all applications are by default scaled by a factor of 1.5 to compensate for the high pixel density of N9. This makes all the touchable areas such as buttons much more pleasant to use.

In case you find an application that does not work well with the new UI magnification, it can be turned off (per app) from settings using the Hydra manager (see screenshot below). Version 1.4.0 also adds support for viewport meta element, which can be used by applications to dynamically customize and/or override the visible viewport and scale factor.

New widget settings view introduced in version 1.4.0.

torstai 16. toukokuuta 2013

Hydra and Packaged Firefox OS Web Apps

Hydra widget platform (PRO) 1.3.7 has now been available for a few weeks and a major issue has risen with the Firefox OS compatibly. As you may know by now, Firefox OS supports two kinds of deployment mechanisms for it's web applications, called hosted and packaged. Usually applications are distributed in the hosted format, but apps that require a certain level of device access can only be deployed in the packaged format, which is in many ways similar to W3C's widget packaging format. While Hydra supports both of these formats, it is currently only possible to install hosted applications from the Firefox Marketplace.

When I originally developed the support for Firefox OS web apps, packaged applications could be installed without any issues. But it seems that since then the Marketplace has changed the way it detects what kind of device is used to view it's content. The reason they have done this change is to properly detect Android devices and block packaged apps from being available (hosted web apps can be installed on Android using Firefox Aurora).

To make up for this inconvenience, I'll shortly release an updated version of Hydra and the Marketplace widget that the Marketplace once again recognizes as a genuine Firefox OS device. In addition to that, packaged applications are getting support for automatic update detection (see the teaser below).

Updates will be indicated in the Hydra manager app and device notifications area.

Updates will be fully supported for packaged Firefox OS web apps.

tiistai 19. maaliskuuta 2013

Mozilla web apps

Today I will demonstrate the simple steps required to install Mozilla web apps on your N9. To begin, you will need Hydra WRT installed (at least version 1.3.7 that will be released in the near future - hang in there for a while longer!).

Step 1. The first step is to install the Firefox Marketplace shortcut widget. You can do this by opening the Hydra management application ("Web apps" in the launcher), then selecting the paper clip icon in the toolbar. From the shown list, pick Firefox Marketplace and hit the Install button (as shown in the screenshot below). After this, details of the Marketplace widget are shown and you must confirm the installation.

Step 1 - Installing Firefox Marketplace widget
Step 2. When the installation is complete (it really only takes a second), you can use the normal web interface of the Firefox OS Marketplace to browse it's content. Please note that you the system's default browser is not compatible with the Marketplace and the installed shortcut widget must be used to browse and install new content from the store (a "Marketplace" shortcut is created in the application launcher view during installation). To install an item from the store, simply hit the blue colored "Free" button shown on app details view. The button's text will change into a progress spinner (as shown in the screenshot below) and soon an installation confirmation view will be shown.

Step 2 - Installing content from the Marketplace

Step 3. After installing a web app, you can find a shortcut to launch it from the system's regular application launcher view. Enjoy.

Step 3 - Running the apps

Known issues and limitations:

  • Only a few web app permission requests are recognized, for any apps requesting Firefox OS specific APIs the installation will simply fail
  • Apps requiring geolocation are allowed to be installed, but geolocation is not actually provided
  • Marketplace widget shows some minor graphical errors
  • Marketplace widget crashes randomly (appears to be a webkit issue - actual installation is done by another process so there is no risk of corrupting any files)
  • Marketplace sometimes returns corrupted app manifest, which will cause the installation to fail (Marketplace bug, though it seems possible to create a work-around for this)
  • Some unsupported web app management APIs such as uninstall, check for updates, request app details and request apps installed from same origin
  • App details returned by the JavaScript API after successfully installing a web app contain a timestamp that is (slightly) different from timestamp stored to disk by Hydra
  • HTML5 offline cache and web storage are not supported (yet) 


My top-3 web app recommendations so far:

lauantai 9. maaliskuuta 2013

Next frontier in web applications

Just wanted to give you a bit of a teaser for a very special upcoming new feature for Hydra WRT. In a few weeks (a bit longer for non-pro version users),  I'm going to release a version with an experimental support for Firefox OS web apps. The nice thing about Firefox OS platform is that there is already an app store with some content available at https://marketplace.firefox.com/ and I will also be releasing a web application that makes it possible to install apps directly from the store.
Firefox marketplace app details view on N9

Installed Twitter web app running on N9