-1

I am completely new to Tizen development. And I need to develop an Tizen wearable native application which shows 3 text views(1. for current step count, 2. speed, 3. for distance) as soon as I get values from the sensors I need to assign these values to text views. Currently I am able to get values from sensors using:

function onchangedCB(pedometerdata) {
     tizen.humanactivitymonitor.getHumanActivityData("PEDOMETER", onsuccessCB, onerrorCB);
} 

tizen.humanactivitymonitor.start("PEDOMETER", onchangedCB);

But stuck at UI part. I tried finding samples from Tizen but couldn't find it. Also I tried reading their documentation but Not able to design simple UI.

Community
  • 1
  • 1
Akshay
  • 833
  • 2
  • 16
  • 34

1 Answers1

0

Take a Tizen TAU Basic project from Tizen Studio template. And use these code

// index.html

<div class="ui-page ui-page-active" id="main">
        <header class="ui-header">
            <h2 class="ui-title">TAU Basic</h2>
        </header>
        <div class="ui-content content-padding">
            <div>
                <span id="step"></span>
            </div>
            <div>
                <span id="speed"></span>
            </div>
            <div>
                <span id="distance"></span>
            </div>
        </div>
    </div>

// main.js

 document.getElementById("step").innerHTML = "Step Count is 1100 ";
 document.getElementById("speed").innerHTML = "Speed is 98 KM/h ";
 document.getElementById("distance").innerHTML = "Distance covered 6.1 KM";

Tizen Multiple text element

Iqbal hossain
  • 1,778
  • 3
  • 17
  • 24
  • Thanks Iqbal for your answer. Sorry I forgot to mention I need to develop Native application (C/ C++). Can you update your answer for native app? – Akshay May 19 '17 at 18:47
  • yes, As I was not able to design UI when trying to use Native application so tried developing web application. and used web apis for getting data. – Akshay May 19 '17 at 21:30
  • What have you tried in native part ? please post these and update the answer – Iqbal hossain May 21 '17 at 16:23