message_port_send_message( ) returning error: “-5”

message_port_send_message( ) returning error: “-5”

BY 21 Mar 2015 Native Application Development

Hi,

I have created a hybrid app and want a communication between webapp and a service native app. I am following this link for reference: https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/tutorials/app_tutorial/message_port_tutorial.htm#uni 

I have registered the local port in webapp and waiting for receiving data from service app. In service app, I have first checked the availability of port using  

message_port_check_remote_port (x, y, &z)

 where I have given “x” as my webapp id and “y” as local port of webapp  and “z” is coming out to be “true” which means that it has found the corresponding port. 

Now subsequently when I try to send a message using 

message_port_send_message(x, y, bundle)

 with x and y same as before and passing bundle which I’ve created, I get an error of “-5“. What does it signify ? Where I am going wrong ? Can someone help me on this ?

EDIT: I figured out that the error is “MESSAGE_PORT_ERROR_IO_ERROR”. What possibly can be the cause of this ?

Thanks.

Written by