Tabris 0.9.0 - New & Noteworthy
Just in time for Christmas, I’m happy to announce our biggest release yet: Tabris 0.9.0. The new AppLauncher API will enable a tighter integration with iOS and Android and a seamless user experience with other Apps. Alternative Selection for List and Tree is now available. And many changes and additions happened under the hood - such as the RAP 2.0 migration as well as stability and performance improvements.
AppLauncher API
The new AppLauncher API enables tight integration between your Tabris apps and all the common apps on iOS and Android. For each type of app you can interact with, there is an Options object you provide as parameter. Here is an example how to use the AppLauncher API to show an address within the Maps app using MapsOptions
:
AppLauncher launcher = RWT.getClient().getService( AppLauncher.class );
launcher.open( new MapsOptions( "Lammstr. 21, 76133 Karlsruhe, Germany" ) );
- BrowserOptions - Open a URL in the Browser app.
- MapsOptions - Open the Map app with latitude+longitude or a address as text query.
- SMSOptions - Open the Messaging app with a number and the message.
- MailOptions - Open the Mail app with to, cc, subject and the message body.
- PhoneOptions - Open the dialer to start a phone call.
- Twitter- and FacebookOptions- Open Twitter or Facebook to add social integration in your app to post a message with an optional URL.
- Generic openURL - With this you can open arbitrary URLs with the most appropriate app, which is determined by iOS or Android.
Check the sources on GitHub of our “Breaking Bad"-themed demo app called “launcher” to see how the API is used.
Alternative Selection for List and Tree
We now support a new UI element on SWT List
and Tree
(aka Detail Disclosure Button on iOS) on Android and iOS.
Here is an example how to activate the alternative selection on an SWT Tree only for the leaf TreeItems:
Widgets.onTree( tree ).enableAlternativeSelection( TreePart.LEAF );
In your SelectionListener you can then distinguish the SelectionEvents you receive:
tree.addSelectionListener( new SelectionAdapter() {
public void widgetSelected( SelectionEvent event ) {
if( (event.stateMask & SWT.ALT) != 0 ) {
// Alternative Selection
} else {
// Standard Selection
}
}
});
Remote Application Platform (RAP) 2.0
Starting with Tabris 0.9.0 we are now built on RAP 2.0. Have a look at the RAP 2.0 New and Noteworthy and the RAP 2.0 migration guide to see what changed and what adjustments you might need to make to your code. Please ensure you update your Target! In case you forgot, here is the URL to the p2 repository: http://developer.eclipsesource.com/technology/tabris/downloads/releases
In Tabris, the following changes relate to the RAP 2.0 migration:
Reworked the clients and how they communicate to the server. All communication is now 100% JSON.
UICallback is now ServerPush, which is now a way more robust implementation on the Tabris clients.
New Bootstrapper mechanism. It is used to enable Tabris in your ApplicationConfiguration without the need of confusing startlevels.
Bootstrapper bootstrapper = new Bootstrapper( application ); bootstrapper.bootstrap();
Next for Tabris
Since the last Tabris release, we also published our new Tabris website. One of the highlights is the Roadmap section. There you can see what happend in the past, what we are currently working on, and what you can expect in the future. Of course, you can comment on all topics and contribute your ideas - It’s all publicly available on GitHub Issues.