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
Highlighted
Developer
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

DataSource External URL

Trying to load some json from an external url. Does this look right?

 

                DataSource {

                    id: dataSource2

                    source: "https://www.googleapis.com/books/v1/volumes?q=isbn:9780803269248"

                    onDataLoaded: {

                        console.log("DataSource2 is loading...")

                        console.log(data)

                    }

                }

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: DataSource External URL

Depends. What does that link return? XML, SQL?

 

What are you using the DataSource for a ListView or just your own code?

 

Did you look at this...

 

http://developer.blackberry.com/native/reference/cascades/bb__data__datasource.html


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: DataSource External URL

Hi Phil

 

Not the most helpful answer but here goes

 

My uPnP extension does exactly that with any data source

 

My extension merely wraps miniupnp but is modified for selective uPnP targets - all of whhich is irrelavant as part of the underlying library includes a wget implementation

 

This gets any target and returns the raw which ends up as a nicely usable string to the caller

 

Stupid Q time - the project I'm finishing now needs exactly the same as I want returned data from the Roku

 

I'm investigating ways to do this without huge time spent for release (11th for compo - good product - might as well get a LE)

 

Can you use JS? I'm targeting WebWorks for interface with Native for the hard stuff

 

It appears that I can use a worker to socket the info without drastic battery hits

 

If so - lemme know (email me) and I'll keep you in the loop as to how I get on




Click the like button if you find my posts useful!