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
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel
Accepted Solution

Opening a .jad file from BB10 simulator

I have a app that needs to read soem values from a .jad file that gets downloaded when a browse my server url, once the jad is downloaded, I need to open it from my cascades app and use some specific value from that..?

 

is this possible in BB10.

Please use plain text.
Developer
simon_hain
Posts: 15,869
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Opening a .jad file from BB10 simulator

of course. a jad file is just a text file in a specific format, you can download it as any other file.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel

Re: Opening a .jad file from BB10 simulator

Thanks for the info...

What would be that path to be specified to a QFile, so that I can open it.?

I tried:

QFile afile("accounts//1000//shared//downloads//name.jad");
Please use plain text.
Developer
simon_hain
Posts: 15,869
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Opening a .jad file from BB10 simulator

you don't need to save it as a file, you can download and analyze it directly.
in c++ you would probably use QNetworkRequest, set the url and get the result in the appropriate slot.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel

Re: Opening a .jad file from BB10 simulator

The jad file is downloaded from the browser, my app needs to read that jad file to do some operations..

Please use plain text.
Developer
simon_hain
Posts: 15,869
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: Opening a .jad file from BB10 simulator

maybe you should include information like that in your initial post next time.

the path to the file depends on where it was saved.
did you try a file picker?
https://developer.blackberry.com/cascades/reference/bb__cascades__pickers__filepicker.html
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve
My Carrier: airtel

Re: Opening a .jad file from BB10 simulator

Thanks... :smileyhappy:

Please use plain text.