Languages

Menu
Sites
Language
Opening external webpage from within a Tizen web app

Hello,

This has been a real challenge for me. We have developed a web app and all works fine in the Tizen web based simulator EXCEPT a feature that allows a person to open an external website in a browser window within the app (similar childbrowser in Android and iOS). We have tried so many different variations but none of them work. To put it simply, when a user clicks a link it will open an internal browser page containing an external website. I have applied all the settings to the config.xml file and used what I have been told is the correct code but it continues to simply not work. I will be extremely grateful if someone out there can help me with this issue.

------------------------------------------

added to the config.xml file

    <access origin="https://www.ulore.com" subdomains="true"></access>
    <access origin="*" subdomains="true"></access>
    <access origin="http://www.ulore.com" subdomains="true"></access>
    <access origin="http://ulore.com" subdomains="true"></access>
 
    <feature name="http://tizen.org/api/application"/>
    <feature name="http://tizen.org/api/application.read"/>
    <feature name="http://tizen.org/api/application.launch"/>
    <feature name="http://tizen.org/api/application.kill"/>
    <feature name="http://tizen.org/api/setting"/>
    <feature name="http://tizen.org/api/system"/>
    <feature name="http://tizen.org/api/systemmanager"/>
 
-------------------------
AND when the link is clicked the url value is stored in variable dUrl
 
var target = dUrl;
var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view", target);
 
tizen.application.launchAppControl(appControl, null,
function() {console.log("browser opened"); },
function(e) {App.Share.notify("browser error: " + e.message); });
 
 
I am using Tizen SDK 2.2 on Mac OSX
 
Thanks in advance
Ethan-Anthony

 

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

5 Replies
Raghavendra Reddy Shiva
I was able to launch the browser with the external link, Say your target has below details, var target= "https://www.ulore.com"; function OpenBrowser() { console.log("OpenBrowser() called"); var appControl = new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/view",target ); tizen.application.launchAppControl(appControl, null, function(){console.log("launch appControl succeeded");}, function(e){console.log("launch appControl failed. Reason: " + e.name);} ); } Looks like you have issues with the privilege. I can see you are using Which is not valid on 2.2 SDK, rather it should be as below, Suggest to create a new project using the 2.2 SDK and carefully pull in your existing code.
Ethan Wade
Thanks a bunch for the response. Well I created a new project 2.2 and migrated my code base accordingly. Unfortunately I am still having the same issue. This is quite frustrating as the app would be done, if it were not for this snag. Not sure if it is an issue with privileges in my config.xml but I have done everything according to instructions. If I use window.open the page opens, but the simulator then crashes. I have been able to achieve this in iOS, Android and Firefox OS with absolutely no problem. Not sure where to look next. Thanks Ethan-Anthony
Maxim Khomenko

I have similar problem. Using SDK 2.2 and Simulator. Added polices and privilages, but tizen.application.launchAppControl  throw exception with message "launch application control failed. reason:An attempt is made to reference a Node in a context where it does not exist."

talari praveen kumar

Hi

Tizen appcontrol will not work in simulator. It works only in emulator and tizen device. If you want to do it in simulator use

<iframe src="http://www.google.com"></iframe>
Alexander AVSukhov

Hello,

 

Try add launch privilege to config.xml:

<tizen:privilege name="http://tizen.org/privilege/application.launch"/>