언어 설정

Menu
Sites
Language
HelloGearConsumer project for Gear 2

I can't find the HelloGearConsumer project referred to in section 2.2 "Importing the HelloGearConsumer Project using the Tizen SDK for Wearable" of the "Samsung Gear Application, Getting Started" guide. All the samples I have found (for the Consumer side (Tizen Gear 2) of the HelloAccessory sample call it HelloAccessoryConsumer and have .java code rather than the .js code shown (main.js) in Section 2.2 of the guide.

I naively tried to build the HelloAccessoryConsumer project in the Tizen for Wearable IDE and got all sorts of strange Java compiler errors (i.e. Cannot find java.lang.Object) that I couldn't fix with pointing to the right JRE but now I'm thinking that sample projects with .java code are really for the original non-Tizen Gear One.

I'm very confused that on the Samsung Gear web page (http://developer.samsung.com/samsung-gear) that the Hello Accessory sample has .java code (which I assume is for a Gear One) on the Gear side when I thought it should be .js for a Tizen Gear 2.

Am I missing something here?

Thanks

Responses

16 댓글

The idea is that Gear app is split into two parts. The Provider and the Consumer.

We ar talking here about android and therefore the Provider is Java APK and the Consumor is Tizen HTML5 widget.

To create Gear 2 app, you need to create the widget and then copy it to the Android Provider project.

Once you create the APK, User uses Gear manager to install the APK and then the gear manager send the widget to the Gear 2

The idea is to make every Gear 2 app uses the mobile device for the "real code and operations" and the Gear device as a User Interface only

For example, If you want to know your GPS location, your will do the

- Open then gear 2 app (widget)

- Request the location

-Gear 2 send the request to your phone.

- Your phone finds the location and send it to the Gear 2

- Gear 2 disply the information to you

Communication protocol is bluethooth only

Sure, you can create all the operations in the widget tizen app (if the API supports it) and create dummy APK that just install the widget

 

 

 

Larry Beck

Thanks for the reply. I understand that there is a Consumer on the Tizen Gear2 communicating with a Provider on the Android Galaxy device. What I can't figure out is why the HelloAccessory sample has Java code (HelloAccessoryActivity.java and HelloAccessoryConsumerService.java) for the Tizen Consumer- isn't code for the Tizen side written in Javascript (.js)? My problem is not in understanding the architecture but why the sample from Samsung is wrong. Or is it that I am wrong in thinking that code for the Tizen Gear 2 is never written in Java?

Thanks

I don't understand your problem. HelloAccessory.zip contains 2 folders

- Install APK: contains HelloAccessoryProvider.apk

- Sources: contians 2 folders (HelloAccessoryConsumer and HelloAccessoryProvider )
 

HelloAccessoryConsumer = Tizen project -  No java

HelloAccessoryProvider : Android project - Java

So, whats wrong with it?

There is no Java code inside HelloAccessoryConsumer folder!

Dina Hamid

Hi,

 

Samsung has updated the HelloAccessory zip file. In the old version there was no java files included. But there has been many complaints that their sample application is not working. This might be the reason why they updated the zip, to solve those problems. However for development, I use js and html5 only.

Do you mean I have the old version?

This version works fine. Tested on the emulator and the device

Ohhhhh - they updated the zip file with java code inside the tizen project ... I have the old version .. funny ... The old version was working fine and I have tested it

Dina Hamid

Hello Nour, where you able to run the HelloAccessory sample successfully? (I.e could you see the widget on the gear?). I build the application, generate the apk file, install it on my phone, and it gets installed, but never appears in the gear manager, and hence, the widget is never sent to the gear!

I tested it using the provided apks in the install folder, and tested also with my own generated apk. Same result. I used Galaxy Note 3, and Gear (1).

 

Can you tell me if you were able to successfully install it, and if yes, what is your environment, what did you use?

Salam Dina :)

Yes, I used Note 10.1 (Android 4.3) and Tizen Gear emulator on Windows 7 32 bits - as described in the help document: "Guideline on Testing Gear applications using the Emulator"

Gear 1 is android device .. this can't work .. just follow the guideline .. it works.

I push the widget to Tizen emulator from Tizen SDK and not from Gear manager. Actually you have to uninstall Gear Managaer and install "Applications for Emulator" provided by Samsung  if you want to test using the emulator

 

Larry Beck

Thanks for your input. Where might I get the old sample with no Java on the Tizen consumer side?

I decided to try the other 2 samples (Gallery and FIle Transfer) and I was able to Build the Android side of each sample (which already had a .wgt file in assets folder) and when I did Run (with my Note 3 connect by USB to my Win7 machine) each of those projects would download the Android app to the phone and show up in Gear Manager and on my Gear 2 and work (either display pictures from the Note 3 on the Gear 2 or transfer a file from the Gear 2 to the Note 3).

My problem is that although each of the sample projects would build in the Wearable Tizen Eclipse IDE, when I copied the generated .wgt file to the Andoid project's asset folder (after deleting the existing .wgt file) and did a clean, build and run, the Android IDE Console said it succeeded however when I looked at the Note 3 I had a dialog saying "Warning Failed to install the App.". Before pushing the new app over to the Note 3, I had removed the previously loaded widget from the Gear 2 using Gear Manager and removed the Andoid part of the app from the Note 3 using Settings>Applications.

Do I need some sort of security certificate in the Tizen .wgt like I did when I was fooling around with the non-Wearable Tizen SDK?

Also, it sounds like you are using the Android emulator rather than an actual Galaxy phone, do you also run an Emulator for the Gear 2 that connects with the Android Emulator?

Thanks

Larry Beck

I just noticed a new post "gear 2 - failed to install app error" that appears to answer my question about failing to load and maybe needing a certificate.

Thanks again

No, I am using real note device + tizen gear emulator.
I couldn't find the original zip HelloAccessory. I have modified and changed the current project.. just playing with the code ..removing and adding for learning sorry
dutch slab

As far as I can tell, it appears the correct HelloAccessory source to use is available in the Applications for Emulator

package download available at http://developer.samsung.com/samsung-gear. Kind of too bad its such a sloppy mess.. the same app name in three different packages, all different code, and the docs don't specific which to use.

Larry Beck

Thanks so much, I was going nuts trying to figure out why there was Java code on the Tizen side and no mention of using GWT to compile it to Javascript.

Turns out I had already downloaded the Applications for Emulator .zip but never thought to look in there. I have been fooling around with the File Transfer samples that I probably got from the wrong place, and when I build the Tizen Conumer side .wgt of either and replace the one in the Android Provider assets/ folder with my new one, I get a Failed to Install on the Android device. I'm thinking it''s a problem with a security certificate or something.

Should I expect the samples in Applications for Emulator to be easier to fool around with? Do I need to create a security certificate for the Tizen side if I want to play with code there? Does the certificate need to be the same as the one on the Android side (i.e. the "debug" one)? I don't know exactly how I am supposed to create these certificates and install them in the Tizen package. It seems strange that Samsung left out these instructions in the sample documentation (or maybe just more sloppy work?).

dutch slab

Turns out I had already downloaded the Applications for Emulator .zip but never thought to look in there. I have been fooling around with the File Transfer samples that I probably got from the wrong place, and when I build the Tizen Conumer side .wgt of either and replace the one in the Android Provider assets/ folder with my new one, I get a Failed to Install on the Android device. I'm thinking it''s a problem with a security certificate or something.

Yes, I'm having the same exact problem, which I've opened up in another thread (on the Samsung Forums). When I get a chance to play with it this evening, I'm going to try to re-install the IDE and SDKs, I am told it may be the solution, but I'm not sure yet.

 

Should I expect the samples in Applications for Emulator to be easier to fool around with? Do I need to create a security certificate for the Tizen side if I want to play with code there? Does the certificate need to be the same as the one on the Android side (i.e. the "debug" one)? I don't know exactly how I am supposed to create these certificates and install them in the Tizen package. It seems strange that Samsung left out these instructions in the sample documentation (or maybe just more sloppy work?).

I have the same questions, and nobody has been able to answer them yet... Its unfortunate, but I hope their representatives will be able to answer to this thread and clarify that soon.

 

Larry Beck

Thanks for the update. I found your thread "sample helloaccessory app fails to install " on the Samsung Forum- that looks like it may be the right forum to get answers from, especially if anyone from Samsung monitors it. I'll post there if I discover what the secret formula is to get this sample to work (i.e. provide a basis for beginning Gear 2 development).

--Larry