DEV Community

Cover image for Titanium News #15
Michael Gangolf
Michael Gangolf

Posted on

Titanium News #15

Older posts can be found here.

Intro

It's been a while since I've posted the last Titanium News. Was very busy with work, fixing bugs and adding features to Titanium SDK :-) So let's talk about Titanium SDK!

Titanium 12

We have a new release candidate: 12.1.0.RC. Check the tidev blog for a quick overview and how you can help testing the SDK.

What's new

First we have Node 19 support now. It will still show you a warning to downgrade to Node 16 but I've tested building apps, modules and the SDK with Node 19 and had no issues. If you still have some apps with older SDKs make sure to stay at Node 16; Node 19 will only work with Ti 12.1.0+. If you start with Titanium SDK now you can install the latest Node version and you're fine!

There have been a couple of improvements for macOS support. It will enable the "optimize for Mac" flag and you can use tooltip for views and buttons that are visible when you hover elements with your mouse.

optimize

tooltip tooltip

The BottomNavigation TabGroup tabbar can be shown/hidden in iOS and Android now, even with animation. Check tabBarVisible and the old Android

tabGroup.disableTabNavigation({
  enabled: false,
  animated: true  // new
});
Enter fullscreen mode Exit fullscreen mode

showhide

A new property Ti.UI.availableSystemFontFamilies was added to the SDK that will return available system fonts as a string array.

You can add images into the ListItem editAction now.
listview

If you use multiple notification channels in your Android app you can use Ti.Android.NotificationManager.notificationChannels to return a list of notification channels.

Finally you are able to stop animations on Android elements! view.stopAnimation(); will stop a Ti.UI.createAnimation().

Android 13+ granular media permissions have been added to requestPhotoGalleryPermissions and hasPhotoGalleryPermissions. You can use them with these tiapp.xml permissions:

<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
Enter fullscreen mode Exit fullscreen mode

The iOS WebView.createPDF() method was ported to Android. This allows you to create PDF files from WebViews

Androids floating action button (FAB) was included into the SDK. You can use it with Ti.UI.Android.createFloatingActionButton()
fab

Another new feature was added to the Android VideoPlayer. A property autoHide will keep the videoplayer hidden until the video is loaded. Using this property will hide the "black background" when the video is not ready yet and it will show the background behind it. Check this comment for a video.

In the last Titanium News post I was talking about the CollapseToolbar layout. It is already included in Titanium 12.1.0.RC!
collapse
Click here for a video demo

With the cross-platform Ti.UI.statusBarHeight property you can read the height of the statusbar if you run a fullscreen application.
fullscreen
On Android you can also get the cutout parts for the camera.
cutout
Click here for code and a video

Those who don't like to change colors with Android themes can now use tintColor to change the back arrow color in your toolbar
tint

Those are just the new features! There are many bugfixes and other adjustments to the docs and other parts of Titanium SDK. A full list is inside the release notes

Test it

Download the SDK and give it a test run. If everything runs fine and no major issues are found we will have a final release very soon.

Titanium Meetup

We already had two virtual meetups already and it is great to see the Titanium community join and talk about apps, modules, requests/wishes and more! The third meetup is planed for the 6th of April and will feature a LiveView presentation. Check #announcements at TiSlack for more details on how you can join.

Preview

Java 19 support is on the roadmap and many PRs are waiting to be included. Help to test them https://github.com/tidev/titanium_mobile/pulls so we have some feedback and can merge them quicker.

Community

If you are a reddit user make sure to follow https://www.reddit.com/r/TitaniumSDK/ and https://twitter.com/TiSDKUser for byte-sized Titanium SDK coding tips on Twitter!

Modules

This time I don't have a list of modules. There have been some updates all over the board (e.g. the Firebase modules) but more next time!

Tutorials

Two new tutorials are added on from zero to app

Build an Android app that connects to a MQTT device and Building a photo overlay app

If you are new to Titanium SDK make sure to checkout the tutorials at From zero to app and get started with Titanium to create mobile apps for iOS and Android.

That's it

If you have feedback or some interesting Titanium SDK apps, modules or widgets you would like to share: get in contact with me or leave a comment and I'll add it to the next Titanium news.

Top comments (0)