简体   繁体   English

如何从Tizen的EFL应用程序中调用其他EFL应用程序

[英]How to call other EFL app from your EFL app in Tizen

I'm preparing an app which needs to call the dialer app. 我正在准备一个需要拨打拨号应用程序的应用程序。 How do I go about calling the Dialer app from my app. 如何从我的应用程序调用拨号器应用程序。

My app is being written in EFL. 我的应用程序是用EFL编写的。

If you are working with EFL apps in Tizen, use the following: 如果您正在使用Tizen中的EFL应用程序,请使用以下内容:

service_h service;
service_create(&service);
service_set_package(service, "com.service.call");
service_set_operation(service, "http://tizen.org/appcontrol/operation/main");
service_add_extra_data (service, "launch-type", "MO"); Addtional Data as with Intents
service_send_launch_request(service, NULL,NULL );
service_destroy(service);

This and in your application manifest, add 这个以及在您的应用程序清单中添加

<permit>
    <smack permit="com.samsung.w-launcher-app" type="rw"/>
</permit>

and in your application xml, use this: 并在您的应用程序xml中,使用此:

<privileges>
    <privilege>http://tizen.org/privilege/application.launch</privilege>
</privileges>

What you need is AppControl native API, take a look at this example: https://developer.tizen.org/dev-guide/2.2.0/org.tizen.native.apireference/classTizen_1_1App_1_1AppControl.html 你需要的是AppControl原生API,看一下这个例子: https//developer.tizen.org/dev-guide/2.2.0/org.tizen.native.apireference/classTizen_1_1App_1_1AppControl.html

using namespace Tizen::App;

void
MyAppClass::AppControlDialSample(void)
{

    String telUri = L"tel:12345678900";

    AppControl* pAc = AppManager::FindAppControlN(L"tizen.phone", L"http://tizen.org/appcontrol/operation/dial");
    if(pAc) 
    {
        pAc->Start(&telUri, null, null, null);
        delete pAc;
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM