Languages

Menu
Sites
Language
Watch Face unique identifier or user defined settings

I am building a cryptocurrency application and wanted to sync the watch face app with my websites user, or allow the user a few customizable options.

There are 1,400+ cryptocurrencies and I do not want to make one app per currency.

 

Option 1

Some watch faces have a 'customize' button with additional watch face options, how do I create one of those? I would like to add a drop down the user can select a currency to 'watch'. Somewhere it said the 'customize' button was reserved to partners?

 

Option 2

Get a unique identifier the user can sync with my website so they can change the display from my website. So far from the documenation I can not get the users email, or device unique identifier?

Responses

6 Replies
Iqbal Hossain

hi, you can add dropdown on your watch face app. I have just modified a sample app (Weather Watch) from Tizen Studio.  

I am sharing some code snippets here for understanding,,,,

<body>
    <div id="body-bg">

        <div id="body-time">
            <div id="time-second-indicator"></div>
            <div id="time-min-indicator"></div>
            <div id="time-hour-indicator"></div>
            <div id="time-center-pin"></div>
        </div>

        <div id="body-battery">
            <div id="battery-indicator" class="info-indicator"></div>
            <div id="battery-status" class="info-indicator"></div>
            <div id="battery-text" class="info-text"></div>
            <div id="battery-icon" class="info-icon"></div>
        </div>

        <div id="body-air">
            <div id="air-indicator" class="info-indicator"></div>
            <div id="air-status" class="info-indicator"></div>
            <div id="air-text" class="info-text"></div>
            <div id="air-icon" class="info-icon"></div>
        </div>

        <div id="body-calendar">
            <div id="calendar-month">
               <select>
				  <option value="volvo">Volvo</option>
				  <option value="saab">Saab</option>
				  <option value="mercedes">Mercedes</option>
				  <option value="audi">Audi</option>
				</select>
            </div>
            <div id="calendar-date"></div>
        </div>

        <!-- <div id="body-weather">
            <div id="weather-icon"></div>
            <div id="weather-text"></div>
        </div> -->
    </div>
    <script src="js/app.js"></script>
</body>

And for options 2, you can send MAC address of your device. 

 

henry schultz
Could you link me to the documentation please? The macAddress does not seem accessible to me.
henry schultz

Oh cool! I will look into the MAC address option, I will have the user sync a mac address from my website to there device so it will know which settings to retrieve. :)

A dropdown on the watch face would be pretty clunky. :)

 

Thanks Iqbal Hossain

henry schultz

Mac address is not availabel so I am trying to use IMEI, but...

 

Accessing imei gives me this javascript error in the console:

ripple.js:119580 Uncaught module.exports {…}

 

 

Commenting imei out allows this to work:

          alert("Status: " + cellular.status +  "    Access Point: " + cellular.apn
         + "\nIP Address: " + cellular.ipAddress + "\nIPV6 Address: " + cellular.ipv6Address + "    Country code: " + cellular.mcc
         + "\nNetwork Code: " + cellular.mnc + "    Cell ID: " + cellular.cellId
         + "\nLocation Area code: " + cellular.lac + "    Is Roaming: " + cellular.isRoaming
         + "\nFlight Mode: " + cellular.isFlightMode);
      // + "\nIMEI: " + cellular.imei);
Iqbal Hossain

Try this, 

function onSuccessCallback(cellular) {
        alert("Status: " + cellular.status +  "    Access Point: " + cellular.apn + "\nIP Address: " 
            	+ cellular.ipAddress + "\nIPV6 Address: " + cellular.ipv6Address + "    Country code: " + cellular.mcc 
        		+ "\nNetwork Code: " + cellular.mnc + "    Cell ID: " + cellular.cellId 
        		+ "\nLocation Area code: " + cellular.lac + "    Is Roaming: " + cellular.isRoaming
        		+ "\nFlight Mode: " + cellular.isFlightMode + "    IMEI: " + cellular.imei);
    }
    
     function onErrorCallback(error) {
        alert("Not supported: " + error.message);
    }
    tizen.systeminfo.getPropertyValue("CELLULAR_NETWORK", onSuccessCallback, onErrorCallback);
    
    
    function onSuccessCallback(wifi) {
    	console.log(wifi);
        alert("Status: " + wifi.status +  "    SSID: " + wifi.ssid
        + "\nIP Address: " + wifi.ipAddress + "\nIPV6 Address: " + wifi.ipv6Address + "    Signal Strength: " + wifi.signalStrength);
    }
    
     function onErrorCallback(error) {
        alert("Not supported: " + error.message);
    }
    tizen.systeminfo.getPropertyValue("WIFI_NETWORK", onSuccessCallback, onErrorCallback);

Privilege on config.xml

<tizen:privilege name="http://tizen.org/privilege/system"/>
<tizen:privilege name="http://tizen.org/privilege/telephony"/>