Chrome Custom Tabs with NativeScript

Thanks Google!

There is this awesome new feature for Android apps to use what is called Custom Tabs. What this feature does is allows your Android app to open external content inside Goolge Chrome and not in the traiditonal webview. You can set the color of the toolbar, the enter/exit animations, icons, and menu options. It’s a really nice addition to Android apps when you have links to external content, it keeps the user experience very smooth. There is an advanced usage where you can actually pre load in the background, which Google claims can save 700ms of loading time so it might be worth it for apps using webviews a lot.

Enough rambling, let’s look at the actual code to see how this works. Continue reading “Chrome Custom Tabs with NativeScript”

FullScreen and Navigation Bar Color in a NativeScript Android app

The Story…

I’ve seen a few comments on various channels about how to change the status bar, navigation bar, and full screen layouts on Android in a NativeScript app. In this post I want to cover a few scenarios and how to achieve the specific layout you want in your app. So lets get started.

Continue reading “FullScreen and Navigation Bar Color in a NativeScript Android app”

NativeScript-VideoPlayer Plugin

Go get it: `npm install nativescript-videoplayer`

UPDATE 2/8/2016 10:23am CST

Earlier this morning, Alex Ziskind @digitalix submitted a PR to bring remote video file capability to the iOS version. So now the plugin is full circle supporting local and remote video files on Android and iOS. Thank you Alex!

video

Contributions

Before we dive in I’d like to thank two developers who had major contributions to this plugin so be sure to thank them and check their stuff out.

 

Let’s Get Started…

Since the launch of NativeScript, you could play videos in your apps just not very easily. There weren’t any abstractions done for the native video player components: VideoView (Android) and AVPlayer on iOS.

Well today I’m very happy to announce that it is going to be much easier going forward. I have just finished publishing the plugin to npm. Here is the link: https://www.npmjs.com/package/nativescript-videoplayer.

Continue reading “NativeScript-VideoPlayer Plugin”

Using the Android Palette with NativeScript

Interested in using more Material Design in your NativeScript app? If so then be sure to check out my guest post on Nic Raboy’s blog here @ thepolyglotdeveloper.com. I’d like to thank Nic for the opportunity to guest post on his blog. I’ve only been writing posts for a little over a month and in the time leading up to that point I was a fan of Nic’s blog and style of writing technical posts.

Continue reading “Using the Android Palette with NativeScript”