Topic: Phonegap - Juicebox can't display locally in this browser

Hey guys,
Been using Juicebox on my website with no problem, displays fine on mobile devices as well.

When trying to make an app, it works fine on iOS but displays grey box with this message on android. "Juicebox can't display locally in this browser"

I looked into this error code with no luck and could not find any references to a mobile APP. Any ideas/suggestions?

Thanks,


         
<!--JUICEBOX PICS-->
<script src="jbcore/juicebox.js"></script>
<script>
new juicebox({
configUrl: 'configJuice.xml',
containerId: "juicebox-container",
galleryWidth: "100%",
galleryHeight: "65%",
backgroundColor: "#222222",
});
</script>


            <!--PICS-->
                <div class="sectionTitle" id="pics">
                    PICTURES
                </div>
                <div class="froCell">
                    <div id="juicebox-container">
                    </div>
                    <!--END JUICEBOX EMBED-->
                </div>

Re: Phonegap - Juicebox can't display locally in this browser

Unfortunately, if you encounter the "Juicebox can not display locally in this browser." error, then there is little that you can do.
Certain browsers contain a security restriction that disables loading local files. Please see this FAQ for details:
When I view my gallery locally, I see the message "Juicebox can not display locally in this browser". Why?

Safari is one of the browsers which allows the loading of local files and this might explain why your mobile app works on iOS devices but not on Android devices.
If files are being loaded locally (ie. the web page into which the galley is embedded is not being served over http:// or https://) and one of the browsers known to disallow the loading of local files is detected, then Juicebox will display this error message.

Re: Phonegap - Juicebox can't display locally in this browser

I appreciate the reply. Just to be clear, it's not a matter or where I host the pictures or the config.xml or the juicebox.js?

The FAQ refers to "Or you can upload your gallery to a web server, or setup a local web server for previewing." ...Would this not apply in my case?

Thanks!

Re: Phonegap - Juicebox can't display locally in this browser

In order to not get the "Juicebox can not display locally in this browser." message, the gallery's web page must be viewed over http:// or https:// (or viewed in Firefox or Safari). If the file:/// protocol is used (as it would be for local use), the gallery will fail to display in any browser other than Firefox and Safari.

The gallery structure and location of the 'config.xml' and 'juicebox.js' files (and images) does not matter for this error message.

I'm guessing your mobile app is not loading the web page containing the gallery's embedding code over http:// or https:// (it sounds like everything is hosted locally within the app) which is probably where the problem originates.

Re: Phonegap - Juicebox can't display locally in this browser

I do appreciate the clarification!

Re: Phonegap - Juicebox can't display locally in this browser

No problem!