Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content...

12
Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example

Transcript of Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content...

Page 1: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Tizen Ver2.2 - Web Application

Tizen Content API –Content Manager Application Example

Page 2: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

Contents

• Content Manager Application Example

Page 3: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

Content Manager Example Application

Page 4: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• A simple three – page application• Lists media directories• Lists contents of a selected directory• Overview/preview page for a single piece of content

Page 5: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• Privileges• To use ContentManager interface, the application needs read and

write access• Access can be granted by adding URIs to the Privileges section

of the config.xml

Using Add button, add

http://tizen.org/privilege/content.read

and

http://tizen.org/privilege/content.write

Page 6: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• The first page lists media directories found in the device• In index.html, the first page is defined

• The page contains a listview item that will display a list of directories

Page 7: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• This JavaScripts utilizes getDirectories method to add items to the listview

• getDirectories method returns an array of directories

• The callback function iterates through the directories array, adding each directories to the listview

The callback for

getDirectories

Page 8: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• The second page contains a list of contents in selected directory

• listview directory-contents-list will display title, URI, and size of contents

Page 9: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• JavaScript uses find method to get a list of contents in a selected directory

• For each content in the directory, a link with the title, URI, and size of the content is appended to the listview directory-contents-list

The callback for

find method

Page 10: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• The third page contains information(attributes) of a selected content

• listview content-info will display preview and attributes of the content such as title, URI, release date, etc.

Page 11: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

ContentManager Example

• JavaScript appends each attribute of the content to the listview

• Then, creates an appropriate preview for the content’s data type and prepends to the listview

Creating a

preview

Page 12: Tizen Ver2.2 - Web Application...Tizen Ver2.2 - Web Application Tizen Content API – Content Manager Application Example Ajou Univrsity Contents • Content Manager Application Example

Ajou Univrsity

References

• Jaygarl, Hojun. "Multimedia." Professional Tizen program

ming development. Chichester: Wrox, 2014. 89-95. Print.