androidsamsung-mobilesamsung-mobile-sdksamsung-galaxy-gear

Internet Connection over Samsung Galaxy Gear


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.


Solution

  • 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.