언어 설정

Menu
Sites
Language
Sending a bundle from a native service to a web ui application

Hello,

I have some problem on developing tizen 2.3 hybrid app.

It is possible for a native service to send a string bundle item to a web ui app.

However, I don't know how to implement that the native service sends a byte bundle item and the ui app receives the byte bundle item.

 

Could you please give me guidelines for sending a bundle having a byte bundle item to the ui app??

And, if you have, pleae let me show example codes.

 

Thank you.

 

Edited by: Chun Woo Park on 12 4월, 2015

Responses

8 댓글
Alex Dem

Hi,
Is bundle_add_byte() method suitable for your case or not?
Or do you have problems on Web app side?
Alexey.

Chun Woo Park

Thank you for your reply.

I already used bundle_add_byte() method, but it was not succesful.

Items are added to the bundle on native service.

And, Web app cannot receive items added by bundle_add_byte().

Howerver, the Web app can receive items added by bundle_add_str().

So now, I'm developing message ports by using only bundle_add_str(), even if I know it can be inefficient.

 

 

Alex Dem

Hi,
Yes, It looks like for  bundle_add_byte(resp_msg, "server", "bar\0", 4); on web app side 'onReceived' callback occurs, but for data:
TypeError: 'undefined' is not an object.
Alexey.

Chun Woo Park

Thank you for your reply.

Then, Should I use just bundle_add_str() method for sending data from native service to web app??

If so, it can be so hard to send images from native app to web app..

 

Alex Dem

Hi, 
Looks so,
Also, I don't know all your details but maybe: 
Could you try to save loaded image in file from native service app , send file name/file path to web app via message port, and load file from filesystem in Web app?
Alexey.

Chun Woo Park

Hello,

I should send camera stream from native service app to web app.

The functionalities of the application I've been developing are as follows;

1. To record video through back camera (Not using facing camera)

2. To display the camera stream through web app

As far as I know, the back camera is not available in Tizen 2.3 web api.

And also, one of requirements for the application is to develop the application as hybrid Tizen app...

 

Thank you..

Chun Woo Park

 

 

 

Alex Dem

It is clear now.
I am not sure that this way is good for performance. I suppose (in my opinion) it is better to develop fully native application in this case.
Also fyi (from dev-guide):
For 'message_port_send_message_with_local_port' & for 'message_port_send_message' the recommended message size is under 4KB 
Alexey

Chun Woo Park

OK

Your comments are big helps for devleoping my application.

Thank you so much Alexey!