语言

Menu
Sites
Language
[Hybrid App] privilege issue for public level privileges in native service app

I have developed one hybrid application which has one native service app and one web UI in one single wgt. Native service app needs following privilege: tizen.org/privilege/packagemanager.info and tizen.org/privilege/appmanager.launch. In documentation These privileges are public. But Tizen store has rejected my application multiple times saying that these are unauthorized privileges.
1. I want to launch my web UI app from service app that is why I need "tizen.org/privilege/appmanager.launch". If it can be done by any other way please let me know.
2. When I unistall my package, package is getting uninstalled but service app is still running. To kill that on uninstallation of package I need "tizen.org/privilege/packagemanager.info ". 

My application has been rejected multiple times for unauthorized privilege even if I am using public level privilege. If it is because of making hybrid app, then also there must be a way for application developer to launch his UI from his service app otherwise what is the point creating hybrid application. Tell me the way to do it as I am not able to find any documentation on it.
Also service app should be killed if running when hybrid app is unistalled. This is a bug in existing tizen OS(2.3).
 

编辑者为: Praveen Pandey 24 2月, 2015

响应

11 回复
AVSukhov

Hello,

I have tested Hybrid app on 2.3 and did not observe problem described in the second point.

Web UI and Native Service are packages as one app, and when delete UI app, Service app is deleted.

Service app does not appear separately in Settings -> Application Manager and is part of Web UI app.

 

Praveen Pandey

Yes it is right that service app is also getting deleted from install folder location but if it was running at the time of uninstallation then it continues to run until you restart your device.

My Usecase is:

create one hybrid app in which service app runs alwas (auto-restart=true and  on-boot=true) so service will always be running. Install it.

Now uninstall ui app.

check for running processes service app will still be running.

Now restart device, service app will not run now if you check for running processes. 

But point is if you unistall ui app then it should check if service app is running it should kill it.

Alex Dem

Hi,
Just fyi, regarding 1st item : As I know there is no way to launch another app without http://tizen.org/privilege/appmanager.launch privilege using.
For both app_manager_resume_app & app_control_send_launch_request APIs it is required, but it is public privilege.
Alexey.

Praveen Pandey

Yes it is a public privilege as in docuement but when I use this in my hybrid application then this is no more a public privilege, it becomes partner/platform level privilege. I am not sure why this is so. 

Alex Dem

Hi,
What way are you try to launch another app , what error have you got and what device are you using?
just fyi:
On emulator 2.3.0 I was able to resume UI sample app (which was in background state) from service app this way:
    app_context_h appC;
    app_manager_get_app_context ("org.tizen.myapp", &appC));
    app_manager_resume_app (appC);

both APIs require tizen.org/privilege/packagemanager.info and tizen.org/privilege/appmanager.launch privileges. I did not observe any privilege level violations.
Alexey.

Praveen Pandey

Hi Alex,

Thanks for replying again.

Yes you are right I am doing the same thing you have done. And I am not facing any problem, I am able to launch ui app from service app with same api and privilege you have mentioned.

But problem is when I submit this application to Tizen Store then from there I am getting rejection saying the same reason as mentioned above. They are saying this I am not authorize to use this privilege: tizen.org/privilege/appmanager.launch. Though this is a public level privilege. But when you create a hybrid application where your ui app is web app and service app is native app, in that case your application will be installed via wrt installer.

And in this case "tizen.org/privilege/appmanager.launch" is no more public level privilege. 

I do not know what is the intention behind it. But expected behavior should not be this. Application developer must be able to use this privilege in native app which is part of web ui hybrid app.

So yes like you I was also able to test things in sdk and there was not any problem. But when I submitted same application, it got rejected with message "tizen.org/privilege/appmanager.launch is unauthorized privilege."

Let me know for any clarification if you still have some doubts. 

Praveen Pandey

I am not getting any error at my end. My problem is Tizen Store is rejecting my app saying "tizen.org/privilege/appmanager.launch" is a privilege voilation.

AVSukhov

Hello,

Strange.

Try to use privilege checker tools in IDE. Maybe this is show any errors.

https://developer.tizen.org/dev-guide/2.3.0/org.tizen.gettingstarted/html/tizen_overview/privilege.htm

https://developer.tizen.org/documentation/mobile-web-app-programming/ide-and-tools/web-ide/privilege-checker

https://developer.tizen.org/documentation/mobile-native-app-programming/ide-and-tools/native-ide/api-and-privilege-checker

Praveen Pandey

I have tried it. It did not give any error.

May be because app wise I have used public privilege. But when I put my native app in wgt file (because of hybrid app packaging), then may be public native privileges become private. Though it is not an expected behaviour. 

Alex Dem

Hi,
Just fyi,
Some time ago (near 1 year) we have submitted into Tizen store multipackage app (not hybrid, fully native) for Tizen 2.2.1. We were able to use any similar privileges (appmanager.launch, appmanager.kill) for packaged ServiceApp without any restrictions.
Alexey.

Praveen Pandey

Hi Alex,

yes if I write native ui application then it will work fine. But I have already written web UI and writing native ui is hard for me. But it seems I cannot submit this app with web UI.