Languages

Menu
Sites
Language
download an image from the network ?

I have gear 2, I want to put on the application of a button, click the button to download an image from the network and displayed on the screen, how do I do?

thanks all

View Selected Answer

Responses

6 Replies
Mark as answer
Prajith Premanandan

By simple javascript

JS

function Download(){

    window.location.href="https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcSl_P8r1DWJ3B9HAqnZ1wtpDhP7f93jtAB4Mb1nuTl9m2eZ5OEb";
}

HTML

<input type="button" value="Download" onclick="Download()"></input>

 

Config.xml

<access origin="*" subdomain="true"></access>

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

 

This is what you want or u want image viewer to launch or it should download using Download manager i could'nt really understand your requirement.

YONG LEI

i added  <access origin="*" subdomain="true"></access>   error

Palitsyna

Hello,

try to do this using source editor:

1. open config.xml file

2. open "Policy" tab at the bottom of text editor

3. in Access box click Add button. The first row in the table will be selected. Type your domain or * in "Network URL" column and click on "false" string in "Allow subdomain" column to switch it to "true".

4. Save changes.

Now, if you switch to "Source" tab, you'll see <access origin="*" subdomain="true"></access> line.

YONG LEI

 thanks Palitsyna , i see  

Palitsyna

Hello,

this can be done by many ways, so could you please give more details. The simpliest way is to display it with the help of window.location.href="yourURL", as Prajith Premanandan discribed.

Marco Buettner

You have a Gear 2? You cannot access the internet without a hostdevice and hostapp, you need a host app which "download" the image from the internet and transfer (with SAP) with bluetooth the image to your Gear 2.