Titanium News #15
Tags: titaniumsdk, javascript, mobile, news
Published: 2023-04-03 18:04:21

<small>Older posts can be found [here](https://dev.to/miga).</small>

# 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](https://www.tidev.io/blog/sdk_12_1_0_rc) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dh0trao719ncc1dx9tor.png)

![tooltip](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ptaul1enc4wq03w5mizs.png) ![tooltip](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hv5jxhzjj1os2hxatato.png)

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
});
```
![showhide](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8g3i4b1u995zq5h9hx8d.gif)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrywsvczb3he9xzaz7u1.png)

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:
```xml
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
```

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0m9mwuxfln6oe50ghjqa.jpg)

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](https://github.com/tidev/titanium_mobile/pull/13725#issuecomment-1398608640) 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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sbnx82skdzz965b39ekq.jpg)
[Click here for a video demo](https://github.com/tidev/titanium_mobile/pull/13711#issuecomment-1376394926)

With the cross-platform `Ti.UI.statusBarHeight` property you can read the height of the statusbar if you run a fullscreen application.
![fullscreen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pfy2np3tvsk0eila8y7h.png)
On Android you can also get the cutout parts for the camera.
![cutout](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fc0s5vllau04dgij3qc9.png)
[Click here for code and a video](https://github.com/tidev/titanium_mobile/pull/13733#issue-1560841981)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x5s9yg9av0cf8hg8t74e.png)

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](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_12.x/Titanium_SDK_12.1.0.RC_Release_Note.html)

### 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](https://slack.tidev.io/) 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](https://fromzerotoapp.com/build-an-android-app-that-connects-to-a-mqtt-device/) and [Building a photo overlay app](https://fromzerotoapp.com/building-a-photo-overlay-app/)

If you are new to Titanium SDK make sure to checkout the tutorials at <a href="https://fromzerotoapp.com/">From zero to app</a> 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`.