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

Web and WebWorks Development

Reply
Developer
Posts: 25
Registered: ‎04-30-2011
My Device: Z10
My Carrier: AT&T
Accepted Solution

Issue with having an app pull music from SoundCloud

Hello,

 

 

I am working on an app for a client where I want to put their soundcloud feed into an app. I am clicking on the share option on my clients page on soundcloud and I use the embeded code they provide. If I run the Ripple simulator for BB10 everything loads fine and there are no issues. Once I package the app the widget never loads. Actually the page is blank. I am kind of stumped as to why it will not work.

 

 

Here is the code:

 

<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Fusers%2F488027&amp;color=ff66...

 

Could it possibly be something in the config.xml file that I need to add to have it go out and check the feed?

 

Thanks

Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Issue with having an app pull music from SoundCloud

You definitely will need to whitelist the URL to any Soundcloud domains being used in your app.  More info here:

https://developer.blackberry.com/html5/documentation/access_element_834677_11.html

https://developer.blackberry.com/html5/documentation/accessing_external_resources_webworks.html

 

Otherwise, I would recommend enabling remote web inspector, and try to debug your app running on the device:

https://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html

 

The console or network panel should reveal any runtime errors that might be occuring.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
BlackBerry Development Advisor
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: Issue with having an app pull music from SoundCloud

Hi Boliver15,

 

I was able to get it working by whitelisting the following inside config.xml:

 

<access uri="https://soundcloud.com" subdomains="true"/>
<access uri="https://xiti.com" subdomains="true"/>
<access uri="https://sndcdn.com" subdomains="true"/>
<access uri="https://scorecardresearch.com" subdomains="true"/>
<access uri="https://google-analytics.com" subdomains="true"/>

 These are all the domains the iframe tries to access.

 

In the future, look at the console tab inside Web Inspector, you will find the following:

GET https://ssl.google-analytics.com/ga.js Denied by application 
GET https://api.sndcdn.com/users/488027?client_id=0f8fdbbaa21a9bd18210986a7dc2d72c&format=json Denied by 
GET https://sb.scorecardresearch.com/beacon.js Denied by application 
....

 Next, grab the domain name (only the domain name), and create a whitelist:

<access uri="https://google-analytics.com" subdomains="true"/>

 Make sure to keep the https (or http) and set subdomains="true".

 

Developer
Posts: 25
Registered: ‎04-30-2011
My Device: Z10
My Carrier: AT&T

Re: Issue with having an app pull music from SoundCloud

Wow... I will give this a try immediately!

 

Thanks for the help!