2

I've already built a phonegap application and want to extend its functionality, so that on a SmartWatch users could view text that is generated from an XML file.

There is smartwatch SDK for native android. Its written in Java.

What are the steps necessary to package the SmartWatch functionality that I need into a Phonegap Plugin and what files from the SmartWatch SDK do I need?

Philip Kirkbride
  • 21,381
  • 38
  • 125
  • 225

1 Answers1

1

You'll need to write a Phonegap plugin, to wrap the native Java calls so that you can access them from Javascript.

http://wiki.phonegap.com/w/page/36752779/PhoneGap%20Plugins

[Improved Answer]

Actually you'll have to write Java code if you want to have an app on the watch itself. Realize that you will have a number of components that need to talk with one another.

  1. Your app using Phonegap with the intent plugin to communicate with the Sony LiveWare manager.

  2. The Sony LiveWare manager which will communicate and deploy custom watch apps to your watch. Watch apps use Sony's Java framework so it appears that 'watch apps' live in both the LiveWare manager and the watch itself.

  3. The custom watch app 'running' on the Smartwatch. The app will know how to display your data and/or respond to touch events.

You may be able to find an existing app which will take intent data and display it on the watch. Then all you have to do is fire off an intent with the info you wish to display on the watch to the LiveWare manager which will route the data appropriately.

If you still want to build a custom app for the watch, you'll have to go down the Java route. They do include a simulator so you don't need a watch to try.

Morrison Chang
  • 11,691
  • 3
  • 41
  • 77
  • 1
    Not entirely correct. There are three components involved: 1) the SmartWatch host application that is the bridge to the watch, 2) your extension that does your Phonegap bit and talks to SmartWatch host application, and 3) the Liveware Manager that administers the whole bit. Please check the Smart Extension SDK link in the question for more information. – Jerker Jun 15 '12 at 05:48