Languages

Menu
Sites
Language
open url ways

If I use window.open(url) to open a hlink url

My web app would crash and the simulator console:

"Viewport target-densitydpi is not supported"

I don't know why?

and I want to try other ways to open url

any other ways?

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

Responses

10 Replies
Lakshmi Grandhi
tattoo wu
Hi Lakshmi Grandhi The error appears as follow steps: 1.In tizen sdk new a web project like this: http://i1344.photobucket.com/albums/p654/tattoowu/3_zps14a5be32.png 2.In main.js add the code : setTimeout(function(){window.open("http://www.google.com")},5000); like this: http://i1344.photobucket.com/albums/p654/tattoowu/4_zps5ed4dc7e.png 3.Then debug it to simulator, the UI like this: http://i1344.photobucket.com/albums/p654/tattoowu/1_zpsfa9e3e43.png 4.window.open would auto exe after 5 minutes then I get the error: http://i1344.photobucket.com/albums/p654/tattoowu/2_zps3562964a.png 5.My tizen sdk and simulator version is: http://i1344.photobucket.com/albums/p654/tattoowu/tizen-sdk-simulator-version_zpse1f4b6e1.png http://i1344.photobucket.com/albums/p654/tattoowu/tizen-sdk-20_zpsacfd4a67.png
I assume that you want to open an url in browser. Then you can invoke the application control. Try the following snippet. var target = http://www.example.com; 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); });
tattoo wu
HI oguzhancansever I have tried as your code, I got "[object WebAPIError]" at "function(e) {App.Share.notify("browser error: " + e.message)" I add '' to config.xml already and I change App.Share.notify to console.log but the same error "[object WebAPIError]" appear when exe. If I lost some code or not?
Could you provide the source code of your config.xml? You have to add privilege for application launch.
tattoo wu
single-page
tattoo wu
''' '''
tattoo wu
look at the image http://i1344.photobucket.com/albums/p654/tattoowu/config_zpsb0c5788c.png
Lakshmi Grandhi
Hi, The above code is working fine with application.launch privilege, can you check whether are you able to launch picturegallery using application control. For more details go through the document https://developer.tizen.org/documentation/articles/application-api-guide
tattoo wu
it works! I clean the project and rebuild it ,then it's ok.