Roku CountDown Timer

In this article, I am going to explain how to create a countdown view in Roku using SceneGraph. You can visit the official website of Roku to get more knowledge of its components.

1. Prerequisite

This example needs basic knowledge of BrightScript and SceneGraph component.

2. Creating a New Project

1 –  Create a new project in Eclipse from File ⇒ New BrightScript  and Enter project               name then Next ⇒ Finish

Screenshot 2018-08-01 11.43.17

3. Edit MainScene from components folder

1- init() – Initialise all are you XML node here .

Screenshot 2018-08-01 12.20.36

2 – Start timer

Screenshot 2018-08-01 12.21.01

3- Add Observed  to watch you timer

Screenshot 2018-08-01 12.21.30

4- Utility function

    Add two digit in given time for the countdown

Screenshot 2018-08-01 12.21.49

  Check Second

Screenshot 2018-08-01 12.22.05

5- XML component

Screenshot 2018-08-01 12.31.23

Run and test the app once. Make sure device is having internet connection as internet required to deploy your application on Roku device.

Result :

dev (1)

Check result on youtube link given below:

 

Leave a comment

Design a site like this with WordPress.com
Get started
search previous next tag category expand menu location phone mail time cart zoom edit close