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
Contributor
alberry
Posts: 23
Registered: ‎02-22-2010
My Device: Z10
Accepted Solution

<access subdomains="true" uri="*"/> not working on BB10 with Jquery

Hello.

 

I'm getting 'Javascript Alert: Access to "<my_url_here>?" not allowed. My config.xml contains  <access subdomains="true" uri="*"/> and I'm using jquery mobile/jquery.

 

Does anyone have any idea why? I'm tryong to download server side generated content from a normal jquery $('#mydiv).load(my_url);.

 

Here's my config.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
        xmlns:rim="http://www.blackberry.com/ns/widgets"
        version="1.0.0.1" id="fn4m" xml:lang="en"
        
>
    <author href="http://myapp.com/"
            rim:copyright="Copyright 2013 .">Me.
    </author>
    <name>MyApp</name>
    <icon src="images/bb10/icon150.png"/>
    <content src="bb10.html" rim:allowInvokeParams="true"/>
    <rim:orientation mode="auto"/>
    <rim:splash src="images/bb10/splash1280x768.png"/>
    <rim:splash src="images/bb10/splash768x1280.png"/>    
    <access subdomains="true" uri="*"/>
    
    
    <rim:permissions>
        <rim:permit>read_geolocation</rim:permit>
        <rim:permit>read_device_identifying_information</rim:permit>
        <rim:permit>access_shared</rim:permit>
           
    </rim:permissions>
    
    <feature id="blackberry.app" required="true" version="1.0.0.0"/>
    <feature id="blackberry.app.event" required="true" version="1.0.0.0"/>
    <feature id="blackberry.system" required="true" version="1.0.0.0"/>
    <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
    <feature id="blackberry.ui.dialog" required="true" version="1.0.0.0"/>
    <feature id="blackberry.utils" required="true" version="1.0.0.0"/>

    <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
    <feature id="blackberry.invoke" required="true" version="1.0.0.0"/>
    <feature id="blackberry.invoke.AddressBookArguments" required="true" version="1.0.0.0"/>
    <feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0.0"/>
    <feature id="blackberry.message" required="true" version="1.0.0.0"/>
    <feature id="blackberry.message.sms" required="true" version="1.0.0.0"/>
    <feature id="blackberry.push" required="true" version="1.0.0.0"/>

    
    
</widget>

 

 

Thanks

 

 

Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook

Re: <access subdomains="true" uri="*"/> not working on BB10 with Jquery

Since one of the BB10 updates(I think Gold)

<access subdomains="true" uri="*"/> doesn't work.

You have to list each website that you are white listing individually.
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
Philipk
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook

Re: <access subdomains="true" uri="*"/> not working on BB10 with Jquery

I just came across something in the docs.

<feature id="blackberry.app">
<param name="websecurity" value="disable" />
</feature>

Might give you the same effect as <access subdomains="true" uri="*"/> us't to. Give it a try and let me know if it works.

Found at https://developer.blackberry.com/html5/documentation/param_element.html
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Contributor
alberry
Posts: 23
Registered: ‎02-22-2010
My Device: Z10

Re: <access subdomains="true" uri="*"/> not working on BB10 with Jquery

Thanks for the quick response. I had found the info but since it said not to use it in production, I had decided not to use it. However, after testing, buidling and installing the app on my Z10 I can say that disableing web security works. Actually, it's the only way I found to get the BlackBerry Ads network to work corectly in webworks.

 

Here's the code:

 

<feature id="blackberry.app" required="true" version="1.0.0.0">
          <param name="websecurity" value="disable" />
    </feature>

 As said before, it is NOT recommended by Blackberry for a production envrionment. However, it seems to be the only way to get the BlackBerry ads to work on WebWorks and to get full access. I hope BlackBerry will eventually fix their API and make it easier for developpers to use JQuery and server based applications.

 

Alex

New Contributor
akshayprabs
Posts: 6
Registered: ‎04-13-2013
My Device: Curve

Re: <access subdomains="true" uri="*"/> not working on BB10 with Jquery

The <param name="websecurity" value="disable" /> is not applicable for BB7 and BB6 devices right.??

 

Then how can we include a <feature> tag for each and every domain.??

Contributor
guru01
Posts: 21
Registered: ‎12-31-2012
My Device: 8520

Re: <access subdomains="true" uri="*"/> not working on BB10 with Jquery

Am stock with the same issue.
What about OS7 and older.
The access uri="*" doesn't work too.