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
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink
Accepted Solution

BB10 local:/// not working after OS update

 

In my webworks app, I was redirecting some pages from remotely hosted to locally contained pages within my app. To do that i was simly calling

 

window.location = local:///mylocalpage.html

 

I updated my dev alpha last night to 10.0.9.1675

 

Any workaround?

 

Breaks my ready and uploaded apps :smileytongue:

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: BB10 local:/// not working after OS update

That call should work fine. You are telling WebWorks to get the page at the root of your bar/mylocalpage.html.

 

I just tested it myself and everything seems to work as desired.

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Well, here's my exact scenario.

 

Take a look at this:

 

 <div id="yo"><img src="local:///bg.jpg" width="100%" height="100%" alt="Loading..." /></div>
    <div>

 

 

and then I use this div as my page background setting z index to -1

 

I know this is crazy but savess a lot of loading time on background image.

 

 

This background image was laoding find in older OS but now it doesnt load at all. I do see the alt text.

 

Suggestions?

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: BB10 local:/// not working after OS update

Can we see your config.xml? 

 

There have been changes including how remote urls access local:///

@nukulb
Please use plain text.
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Here we are

 

 

<?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.0" id="com.valueapps.blackberry.prayertimingsbb10">

  <name>Islamic Prayer Timings</name>

  <author>Value Apps</author>

  <description>
       Islamic app that gives you accurate prayer timings based on your location and time zone.
  </description>
    
  <license href="http://opensource.org/licenses/alphabetical">
  </license>

  <!-- Cordova API -->
  <feature id="blackberry.system" required="true" version="1.0.0.0" />
  <feature id="org.apache.cordova" required="true" version="1.0.0" />
  <feature id="blackberry.find" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
  <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.event" required="true" version="1.0.0.0"/>
  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
  <feature id="blackberry.media.camera" />
  <feature id="blackberry.ui.dialog" />
  <feature id="blackberry.connection" />
  <feature id="blackberry.bbm.platform" />
  <feature id="blackberry.invoke.card" />
  <feature id="blackberry.pim.contacts" />
  <feature id="blackberry.ui.contextmenu" />
  <feature id="blackberry.io.filetransfer" />
  <feature id="blackberry.io" />
  <feature id="blackberry.invoke" />
  <feature id="blackberry.invoked" />
  <feature id="blackberry.push" />
  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
  <feature id="blackberry.invoke" version="1.0.0"/>
  <feature id="blackberry.invoke.BrowserArguments" version="1.0.0"/>
  <feature id="blackberry.identity" version="1.0.0"/>
 
  <feature id="blackberry.app.orientation">
    <param name="mode" value="portrait" />
  </feature>
  <!-- Cordova API -->
  <access subdomains="true" uri="file:///store/home" />
  <access subdomains="true" uri="file:///SDCard" />

  <!-- Expose access to all URIs, including the file and http protocols -->
  <access subdomains="true" uri="*" />

  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />

  <rim:loadingScreen backgroundColor="#CFCFCF"
                     foregroundImage="res/screen/blackberry/screen-225.png"
             onFirstLaunch="true">
    <rim:transitionEffect type="fadeOut" />
  </rim:loadingScreen>

 <rim:splash src="splash.jpg"/>
  <content src="main.html" />

  <rim:smileytongue:ermissions>
    <rim:smileytongue:ermit>use_camera</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>read_device_identifying_information</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>access_shared</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>read_geolocation</rim:smileytongue:ermit>
    <rim:smileytongue:ermit>record_audio</rim:smileytongue:ermit>
  </rim:smileytongue:ermissions>

</widget>

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Any documentation on this change? I have quite a number of things broken due to this :smileysad:

 

 

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: BB10 local:/// not working after OS update

You should be running into this with uri * 

 

What is the exact behaviour you ate seeing?

Do you get an error saying access is denied or just nothing happens?

@nukulb
Please use plain text.
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Nothing happens at all.

 

Just numb.

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800
My Carrier: Rogers

Re: BB10 local:/// not working after OS update

Can young look in web inspection if you get an error?

Erik, did you try remote page to local page?
With config.xml set to uri *
@nukulb
Please use plain text.
Trusted Contributor
basitj
Posts: 107
Registered: ‎04-08-2011
My Device: BlackBerry Q10
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Arrrghh, another app broken.

 

This app launches a website in native browser.

 

This line is from my page hosted on a remote server. It comes to websitelauncher on local root to launch the native browser.

 

 

    <a href="local:///websitelauncher.html?ur=<?php echo $result->url; ?>"><img align="absmiddle" src="playme.jpg" width="300" height="215"/></a>

 

Click on this image and nothing happens :smileysad:

Get Speedometer on your phone. http://www.speedometer.mobi
Please use plain text.