Frage

I've built a simple hello world app for Samsung Galaxy Gear and run it on the watch successfully. But when I tried to make an internet connection on app (which is running on Galaxy Gear), a connection fault exception is thrown. I know Galaxy Gear has no internet connection directly. (It is a slave device to Galaxy Note 3).

How can I make internet connection over Samsung Galaxy Gear? What is the best practice for this? Running a service on Galaxy Note 3 and listening/triggering it from Gear?

Edit: I've got a little more information about gear development.

There are three application types for Gear: Stand-alone, Linked (Master-Slave), and Integrated.

Standalone: Watch app does not need a base phone app (i.e. Clock application), and it can operate independently.

Linkage (Master-Slave): Watch app needs to communicate with a base phone app and they do not want to change the base phone app. If a user already installed a base phone app (i.e., Music Player): Once the user downloads the Linked Watch app (i.e., Music Controller), a provider which includes Watch App will be downloaded to the phone and the provider will send Watch app to the Watch. In this case, provider will act as a communicator between the phone and Watch.

If a user has not installed a base phone app: Linkage app can be installed in the same manner as described above. But when a first-time user opens your app, developers MUST show a pop-up to the user suggesting that he/she install the base phone app and providing a link to download.

Integral: Watch app needs to communicate with a base phone app and they want a user to install a new base phone app when the user downloads the Watch app.

Below permissions must be included to the manifest for not to be rejected from the app certification.

1) Standalone: <uses-permission android:name="com.samsung.WATCH_APP_TYPE.Standalone"/>
2) Linked:  <uses-permission android:name="com.samsung.WATCH_APP_TYPE.Linkage_Slave"/>
3) Integrated: <uses-permission android:name="com.samsung.WATCH_APP_TYPE.Integral"/>

But I still don't have the SDK/API for Gear which should include com.samsung.* classes.

War es hilfreich?

Lösung

The Samsung watch communicates with the phone over Bluetooth. Only ONE such radio link can be established at the time, and in case of the Samsung product that connection is in use by the existing firmware that connects to a peer Samsung "Gear Manager" app on the phone side. For now that solution monopolizes use of the established Bluetooh session and implements and controls what can occur over the link. Gear Manager acts as a server that responds to and serves the set of apps that it supports on the watch side. Gear Manager checks on what phone model it runs and will at time of writing only allow to run on select Samsung phone models. Multiple apps on the watch can register with an arbiter mechanism in watch firmware to share the link (API not disclosed) but the kind of traffic that is allowed to occur is controlled by the firmware in cooperation with the phone side Gear Manager app. Typically a developer could come up with the idea "I want my own app on the watch to communicate with MY own developed app on the phone". For now one can only wait for what kind of Gear SDK Samsung will release for public use. It could be restrictive (my assuption) or actually provide for general sharing of the Bluetooth session to allow unleashing of the fantastic combined possibilities with camera,mic,audio,display,internet to the imagination of third parties. The future will tell. For now Samsung run an invite-only scheme where selected ISVs develop apps and these are the only ones with access to expanding the existing set of apps and producing new Gear apps that Samsung approve for entry into their app store.

Andere Tipps

I don't like to answer my question but the current answer is weird:

Samsung engineers only share its sdk/documentation if they want. I had many email conversations with samsung and at the end I'got the sdk and a documentation. I can not share maybe one day they'll share it publicly.

To recollect how the Samsung Gear offering evolved for developers;

Samsung decided to never release any Android SDK publicly for the Gear generation 1 wristwatch. It was available under NDA to members of a Partner Program. For the 2nd generation Gear products Samsung replaced Android with the Tizen operating system and released a public SDK for third party developers. Samsung also released a binary that allow the re-flashing of a generation 1 Gear wristwatch so it runs a Tizen based software. That way a re-flashed first generation watch can run apps produced using the public SDK. As for answering the original question - written back in the day when Android ran on the Gear device; The general way is still that you implement a networking function on the Android phone and implement a portion of UI on the Tizen device that communicate the UI and data you want to present associated with that access and data. This represents a two tier model that Samsung today call "Gear Companion". In this model the phone offers the Internet access capability and relay data to/from the watch as needed. The Gear device does not just represent a UI but implements peripheral hardware such as microphone, speaker and camera. Samsung now also support a standalone app mode for the Gear device, named "Gear Standalone". You find the Samsung provided SDKs and developer documentation here: http://developer.samsung.com/home.do

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top