Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Posts: 35
Registered: ‎01-04-2012
My Device: BlackBerry Q10
My Carrier: o2

WebDownloadRequest()

has anyone used WebDownloadRequest() in QML?

 

I can not get it to work. i have a textfield with the link to  an mp4 file hosted on my server that I want to download

 

I can not get it to work. 

 

If in momentics i type WebDownloadRequest() it says unknown symbol. 

 

I have #include <bb/cascades/WebDownloadRequest> on my main.cpp file

 

anyone out there who can help?

Developer
Posts: 196
Registered: ‎12-14-2009
My Device: Not Specified

Re: WebDownloadRequest()

Anyone get this to work? QML doesn't recognize it and cpp didn't work for me either.

 

Tried 10.1,10.2,10.3 to no avail. Says it ought to work in 10.0

Highlighted
Developer
Posts: 196
Registered: ‎12-14-2009
My Device: Not Specified

Re: WebDownloadRequest()

[ Edited ]

I just got some fuctionality. 

 

 

#include<bb/cascades/WebDownloadRequest>


qmlRegisterType<bb::cascades::WebDownloadRequest>("WebDownloadRequest", 1, 0,"WebDownloadRequest");


 in main.cpp

 

then

 

import WebDownloadRequest 1.0

 in qml

 

and I can succesfully set the url and absolutefilepath. But the thing won't start. How do you initiate the request to start?

Retired
Posts: 9
Registered: ‎10-02-2014
My Device: BlackBerry Z30
My Carrier: Telenor

Re: WebDownloadRequest()

The WebDownloadRequest class was designed to be used together with the "headless" bb::cascades::WebPage class, using WebPage::download().

Since the WebPage class and associated classes are provided for advanced use cases, they are not registered with QML by default, and must be registered manually for apps where WebView does not suffice.