Languages

Menu
Sites
Language
web app mobile with native service application

I manage to build a native service application but get this error from my mobile web app

js/main.js (159) :Running Service App not found. Trying to launch it
js/main.js (129) :Launching [org.tizen.hybridefl] ...
js/main.js (123) :Service Applaunch failed

I try to find some sample but all these links give 404 file not found ???

1) service app tutorial:
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/tutorials/app_tutorial/service_app_tutorial.htm
2) message port tutorials (for interaction between web and native app):
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.native.appprogramming/html/tutorials/app_tutorial/message_port_tutorial.htm
https://developer.tizen.org/dev-guide/2.3.0/org.tizen.mobile.web.appprogramming/html/guide/io_guide/messageport.htm

 

Where i can find sample how to call the service from my web mobile app ?

thanks

Joe

View Selected Answer

Responses

17 Replies
Iqbal Hossain

Hi~

Please make sure you use the appropriate appid of native service in your web app.

You can get your native service appid from Manifest file.

And use that appid in your web app.

After doing this, please try again and let me know about it.

Native Service online sample explanation and Web App online sample explanation.

 

Tizen applications can communicate with each other using message ports. Applications can send and receive messages through message port communication. The message data type for communication is a map data which consists of a bundle (key and value pair).

You can communicate between applications using 2 types of message port:

  • Local port is used to register your message port and prepare to receive messages from another application.

    To receive messages from the another application, set the callback from the local message port.

  • Remote port is used to send messages to other applications. The local message port information can be sent to the other application for bi-directional communication.

A message port supports 2 communication methods:

  • Uni-directional communication

  • Bi-directional communication

You can send and receive trusted messages through message port APIs. The trusted message port instance can be retrieved using the message_port_register_trusted_local_port() function. Communication over the trusted message port is allowed only if both applications are signed with a certificate that is uniquely assigned to its developer.

 

Read more about message port from this and this link.
-Thank You.

Iqbal Hossain

appid in manifest of Native Service:

and main.js

 

 

Iqbal Hossain

Manifest:

 

main.js

joe tiger

Hi

Thanks a lot for the response.

I set the appid of the native service

<service-application appid="org.example.hybridservice" ...

in the main.js of the web app as following

var gServiceAppId = 'org.example.hybridservice';

but still get "Failed to launch HybridServiceApp!"

Could you send me your images at this email since I cannot manage to see them in chrome,safari,firefox ???

Thanks

Joe

JoeTiger05@gmail.com

 

joe tiger

Hi

I finally found the solution at

https://translate.google.co.il/translate?hl=en&sl=ja&u=http://mobilemedia.daynight.jp/html5/03.Hybrid/1.%25E5%258B%2595%25E3%2581%258B%25E3%2581%2597%25E3%2581%25A6%25E3%2581%25BF%25E3%2582%258B.html&prev=search

I succesfully create web app with native service.

when I try to run it on simulator I get this error on start :

NotFoundError

2016-8-15....

is that because I run on simulator and not on a real device ?

Or Did i miss something ?

Thanks

Joe

 

 

Iqbal Hossain

Hi~ 
Sorry for late reply. 
I gave you the same thing. But unfortunately the image is not uploading correctly ! 
You can find the tutorial on this link https://developer.tizen.org/community/tip-tech/packaging-hybrid-application

-Thanks

joe tiger

Hi

After investigation, the tutorial you send me is for wearable device.

I am looking sample for mobile device.

in all cases which version are you recommanded to make it running

for web app 2.4, 2.3.1 or 2.3 ? which on-line template ?

for native app 2.4, 2.3.1 or 2.3 ? which on-line template ?

regards

joe

 

 

Marco Buettner

Pls dont use the Simulator for testing real apis.. SAP is a additional API and not support by Simulator... To Test device-API use the EMULATOR or Real-Device!

I will use the simulator just for UI-Testing

joe tiger

Hi

Thanks but I also get this error with Emulator.

there are the detailed info of the emulator

m-0725-1

x86(32bit)

512Mib

1.0.202

can it work ?

 

Marco Buettner

Can u share your project? I can check it at the afternoon

joe tiger

hi

thanks for your help

I also try on mac and get same error

please find a zip of the 2 projects

webapp

native app service

 

https://uploadfiles.io/e900f

regards

Joe

 

Mark as answer
Marco Buettner

Change

var gServiceAppId = 'BSU8QACA4v.HybridWebApp',

to

var gServiceAppId = 'org.example.hybridserviceapp',

 

joe tiger

Hi

still get "Failed to launch HybridServiceApp!"

regards

Joe

 

joe tiger

hi

please discard previous thread - i  found my problem

thanks a lot Marco and Iqbal for your help !!!

Regards

Joe

Iqbal Hossain

Hi~

I that is your solution, i gave on my fast reply please check again  the explanation link i have given ! 

BTW, Glad to know that your problem is solved. 

Can you share your output screenshot ? 

Is it like this, 

 

joe tiger

yes , of course 

i didn't find how to copy image ?

https://ufile.io/b82f0

thanks a lot

Joe

 

Iqbal Hossain

Ok...great !!!
Can you please share the latest code that worked?