语言

Menu
Sites
Language
Contact App Control

Hello,

In a web application we need to display the add contact form with prefilled information.

I tried to use http://tizen.org/appcontrol/operation/social/add, but the system returns NotFoundError.

So, how can I redirect the user to the add contact form from a web application ?

响应

2 回复
konduri sai swathi

Hi,

The app control you mentioned can only be used in native applications. For web applications you can go through Contacts API : https://developer.tizen.org/dev-guide/2.2.0/org.tizen.web.device.apireference/tizen/contact.html . You can create your own form and fill it with contact information which can be fetched using contacts API and then that contact can also be updated/deleted/modified using Contacts API.

Andrew Gudz

This will open native aplication.

 var appControl = new tizen.ApplicationControl(
            "http://tizen.org/appcontrol/operation/social/add",
            null,
        "vnd.tizen.item.type/vnd.tizen.contact",
            null
        //,null
        , [new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/item_type", ["contact"]), new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/phone", ["+919899045670"]), new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/email", ["susan.miller@tizen.org"]), new tizen.ApplicationControlData("http://tizen.org/appcontrol/data/social/url", ["http://www.susan_miller.com"])]);
        var appControlReplyCallback = {
            onsuccess: function(data) {
                $("#data1").html(data[0].value[0]);
            },
            onfailure: function() {
                $("#data1").html('The launch application control failed');
            }
        };
        tizen.application.launchAppControl(appControl, null, function() {
            $("#result1").html("launch application control succeed");
        }, function(e) {
            $("#result1").html("launch application control failed. reason: " + e.message);
        },
            appControlReplyCallback);