Languages

Menu
Sites
Language
[Gear 2] Problem to run HelloAccessory app from source code

Hello Tizen Gear2 community, I am trying to develop a sample application. I successfully install fresh copy of HelloAccessoryProvider.apk[ on samsung grand2 device ] and HelloAccessoryConsumer.wgt [ on Gear2 emulator] [ I download these two file from samsung gear2 developer forum ], and it works perfectly. Now my problem Scenario : 

  1. At first I Import the souce code of HelloAccessoryProvider in android eclipse ide and HelloAccessoryConsumer in tizen wearable ide
  2. Then build the HelloAccessoryConsumer to generate HelloAccessoryCosumer.wgt 
  3. After that I copy paste HelloAccessoryConsumer.wgt to HelloAccessoryProvider asset folder
  4. Then I build and run the HelloAccessoryProvider in samsung Galaxy Grand2 device
  5. At last I push and install the the HelloAccessoryConsumer.wgt to Gear2 emulator using the following command "sdb install HelloAccessoryConsumer.wgt"
  6. Now when I open the HelloAccessoryConsumer app in Gear2 emulator and click "connect" button it gives the following error : " js/main.js (44) :err [undefined] msg[undefined] " in cosumer application console, and i can not create a connection with the provider application .

Am i missing something in this process ? 

Why consumer application can not create a connection with the provider application ?

Thanks

Responses

4 Replies
Santosh Waddi

I am also facing similar problem. Please help it out

Sanjeev BA

Please refer to

http://developer.samsung.com/technical-doc/view.do?v=T000000160

and the pdf in this site.

Section 2.5 Installing and Running HelloAccessory
To install and run HelloAccessory:
1. Select the HelloAccessoryProvider.apk file.
2. In the menu, select Run as Android Application.
The HelloAccessoryProvider.apk is installed and run on the Host device.
When the installation is complete, the HostManager sends the HelloAccessoryConsumer.wgt file from the assets folder to the WearableManagerService on the wearable and it installs the HelloAccessoryConsumer.wgt file.

(Even if the Host-side application is installed using ADB, the Wearable-side widget is installed automatically after the Host-side application finishes installing properly.)
Note: The Host device must have the Gear Manager installed and must be connected with the Gear through a Bluetooth and Samsung Accessory Protocol(SAP) connection.

From what I observe, you do not need Step (5) in your description.

The Gear Manager is supposed to install the widget once you install the APK in the Android device (provided the Gear2 is connected etc.)

 

 

daniel kim

Hi,


As per the technical document of Samsung, we need to install the wgt file into emulator seperately in case of communiction between Gear2 emulator and android phone.


But I observe this error instead of "js/main.js (44) :err [undefined] msg[undefined] " error when I test it.


    [PolicyInformationPoint.cpp:204] getAttributesValues(): Invalid widget type

daniel kim

Hi,


As per the technical document of Samsung, we need to install the wgt file into emulator seperately in case of communiction between Gear2 emulator and android phone.


But I observe this error instead of "js/main.js (44) :err [undefined] msg[undefined] " error when I test it.


    [PolicyInformationPoint.cpp:204] getAttributesValues(): Invalid widget type