언어 설정

Menu
Sites
Language
Wearable develupment questions

We have some few questions about develuping with the Tizen wearable (to be spesific are we develuping for a Samsung Gear S smartwatch). Just answer with the following number if possible. We are using HTML5 and Javascript.

1) Is it possible to make round buttons? So far are we only able to make squre buttons with the <button> tag.

2) Is it possible to show a new html page for a few seconds and then make it disappear on its own?

3) Is there a way to get data (like from an array) out of the watch and over to a PC with a file or some wireless connection? We need to make a graph of some accelerometer data we collect.

4) We use the <input> tag so the user is able to type in a phone number, but how can we save what is typed into the input to a variable in javascript?

5) How do we make a call using javascript code?

6) Is there a way to run an application while the app is not displaying/closed?

Responses

2 댓글
Vikram

Hello,

Please find my answer.

1) Is it possible to make round buttons? So far are we only able to make squre buttons with the <button> tag.

--> There is a way to make a custom icon for button as following.


  <div class="ui-grid-row">
   <button type="button" class="ui-btn ui-btn-icon"
           style="background-image: url(images/00_icon_back_ef.png);">
            Button Icon
   </button>
   </div>

 

3) Is there a way to get data (like from an array) out of the watch and over to a PC with a file or some wireless connection? We need to make a graph of some accelerometer data we collect. 

--> You can store your data to the file by file api and sync to PC with network in Gear S standalone mode. but in case of linked mode with phone, you need to send data to phone first through SAP. and then you can sync data between phone and PC.

 

 4) We use the <input> tag so the user is able to type in a phone number, but how can we save what is typed into the input to a variable in javascript?

-- > I think that you can get the typed data by getElementById().

     var input = document.getElementById("phone");

   

5) How do we make a call using javascript code?

 --> Below code will help you and this is the way to make a call.

     var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/call", 'tel:' + phone);
         tizen.application.launchAppControl(appControl, null,
                 function(){console.log("launch appControl succeeded");},
                 function(e){console.log("launch appControl failed.  " + e.name);} );

 

6) Is there a way to run an application while the app is not displaying/closed?

 --> You can launch an application using AppControl. this link has basic guide of ApplicationControl. 

      https://developer.tizen.org/documentation/tutorials/web-application/tizen-features/application/application

 

Hope this help you.

 

AVSukhov

Hello,

It would be helpful if you could provide the more detailed requirements of paragraph 2.

You can create some dom element, f.e. div:

<div id="test"></div>

with following style:

position: abolute;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: none;

place your html markup to this element.

And when it is necessary to show and hide this item, f.e. using jQuery.show and hide methods, or using css() with visibility propertie.

Also using setTimeout() for the delay.

 

Or you can navigate to your page and after few seconds navigate back.

Again, it all depends on your behavior requirements.