Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam...
Transcript of Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam...
![Page 1: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/1.jpg)
Best practices in Tizen
Wearable development
Adam Panasiuk
![Page 2: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/2.jpg)
2
Presentation contents
• Introduction
• Tizen Wearable
• Development & Tips
• Testing and certification
• Summary
• Q&A
![Page 3: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/3.jpg)
Introduction
![Page 4: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/4.jpg)
4
Wearable gadgets
![Page 5: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/5.jpg)
Tizen Wearable
![Page 6: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/6.jpg)
6
Tizen Wearable: Gear 2
![Page 7: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/7.jpg)
7
Tizen Wearable: Gear S
![Page 8: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/8.jpg)
8
Tizen Wearable: Getting Started
![Page 9: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/9.jpg)
9
Tizen Wearable: Getting Started
![Page 10: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/10.jpg)
Development
& Tips
![Page 11: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/11.jpg)
11
Tizen Wearable: Getting Started
http://developer.samsung.com/samsung-gear
![Page 12: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/12.jpg)
12
Tizen Wearable IDE
![Page 13: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/13.jpg)
13
Tizen Wearable IDE
Project components:
![Page 14: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/14.jpg)
14
Tizen Wearable Gear Manager, Wearable Manager Service, Samsung Accessory Protocol
![Page 15: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/15.jpg)
15
Tizen Wearable
![Page 16: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/16.jpg)
16
var date = new Date();
Development Tips Use specialized Tizen API’s instead of generic JavaScript. Example:
Instead of:
Use: var date = tizen.time.getCurrentDateTime();
Specialized Tizen Wearable API’s synchronize with the connected phone,
preventing problems with manual time change and when swithing time zones.
More info: https://developer.tizen.org/dev-
guide/2.2.1/org.tizen.web.device.apireference/tizen/time.html
![Page 17: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/17.jpg)
17
tizen.power.request("SCREEN", "SCREEN_NORMAL");
tizen.power.request('CPU', 'CPU_AWAKE');
Development Tips Use CPU and wake locks when needed.
After a certain time of inactivity, the device will turn its screen off.
To prevent this behaviour, implement a wake and a CPU lock.
Remember to release the locks when not needed anymore. tizen.power.release("SCREEN");
tizen.power.release('CPU')');
In order to use this, the power privilege must be declared in the config.xml file <tizen:privilege name="http://tizen.org/privilege/power"/>
More info: https://developer.tizen.org/dev-
guide/2.2.1/org.tizen.web.device.apireference/tizen/power.html
![Page 18: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/18.jpg)
18
{
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
}
Development Tips <div> elements are highlighted in orange.
After touching a clickable <div> element on the device, it gets highlighted in
orange for a short period of time. To disable this, in your CSS insert the
following:
More info: https://developer.tizen.org/forums/web-application-
development/gear-tags-onclick-are-highlighted-orange
![Page 19: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/19.jpg)
19
// CSS for screens with max resolution == 320px - Gear, Gear 2, Gear 2 Neo
@media screen and (max-width: 320px) {
div#main {
width: 320px;
height: 320px;
}
}
// CSS for screens with max resolution == 360px - Gear S
@media screen and (max-width: 360px) {
div#main {
width: 360px;
height: 480px;
}
}
// Other styles, that are the same for both resolutions
div#container {
background-color: #000000;
}
Development Tips If your app is destined for multiple devices with different
resolutions use CSS Media Queries. Example:
More info: https://developer.mozilla.org/en-
US/docs/Web/Guide/CSS/Media_queries
Remember to add the appropriate line into your config.xml file
<feature name="http://tizen.org/feature/screen.size.all"/>
![Page 20: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/20.jpg)
20
Development Tips
You can also upload diffferent binaries per resolution
(recommended when functionalities vary between devices).
Keep in mind, that not all devices have the same capabilities. For
example, the Gear 2 Neo does not have a camera. In this case, you
can upload different binaries under the same app name.
![Page 21: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/21.jpg)
Testing and Certification
![Page 22: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/22.jpg)
22
Emulator
![Page 23: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/23.jpg)
23
Remote Test Lab
http://developer.samsung.com/remotetestlab
![Page 24: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/24.jpg)
24
Certification
http://seller.samsungapps.com/
![Page 25: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/25.jpg)
25
Certification
http://seller.samsungapps.com/
![Page 26: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/26.jpg)
Summary
![Page 27: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/27.jpg)
Q&A
![Page 28: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/28.jpg)
28
Thank you for your attention.
![Page 29: Best practices in Tizen Wearable development...Best practices in Tizen Wearable development Adam Panasiuk 2 Presentation contents • Introduction • Tizen Wearable • Development](https://reader030.fdocuments.net/reader030/viewer/2022040307/5ecef7c73638d45b5b7c6eb5/html5/thumbnails/29.jpg)