BB10, Phonegap 3.0.0 + InAppBrowser

Hello

I'm developing an application with Phonegap 3.0.0 and I have a problem with the InAppBrowser, it just doesn't work. I added the plugin and still getting the 404 error. Then, I inspected the plugin and found that a readme file in the blackberry10 folder, indicating that the plugin is not necessary for BB10. However, it does not.

I also tested in Phonegap 2.8.0 and oddly enough it does not work there.

Suggestions?

Thank you!

Hey,.

Thanks for your response!

I have just solved the problem myself. :-)

It seemed that the configuration of the automatic plugin of phonegap kept a reference to the InAppBrowser plugin in the file blackberry10.json, whereas it should not. Deleted manually and the problem was solved!

The other 2 problems I posted are not yet resolved.

Tags: BlackBerry Developers

Similar Questions

  • BB10, Phonegap 3.0.0 + Facebook

    Hello

    I am developing an application with Phonegap 3.0.0 and need to add the ability to post a message on Facebook. I thought that the best way to go was to create a plugin to be able to invoke the native Facebook application. But that was not a great success so far.

    First, I tried to test the plugin with the plugin base Echo system (as seen in the Phonegap docs). I've downloaded, added the plugin, added the code and tried to run on the device. Unfortunately, I get the 404 error when trying to test the echo, but the plugin seems to init properly. Any suggestions?

    And is there another way to call native Facebook share to Phonegap?

    Thank you!

    There is some information and and example linked here: http://devblog.blackberry.com/2013/02/twitter-and-facebook-cards/

    You can post, even if the code is different, that the values are given here: https://developer.blackberry.com/cascades/documentation/device_platform/invocation/facebook.html

    In addition, about plugins for PhoneGap, we have a model under review for releases in GitHub. It does more than the Echo thing, so it should be more valuable starting point. I guess it will go live sometime next week - when more people are back from vacation to examine it.

  • BB10, Phonegap 3.0.0 + FileTransfer

    Hello

    I'm developing an application with Phonegap 3.0.0 and I have a question about the file transfer.

    When the application loads, it checks for new files and download them. Downloaded files must then be stored locally.

    I get the system files like this:

    window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, gotFS, error);

    After that, I get the file and transfer files. The files are stored in the root path: local: / / / persistent.

    The problem is that I have been able to show the files in a tag, because I don't understand where the files are actually or how to get them. I've tried local: / / / persistent/filename and file:///persistent/filename and none of them work, I have even tried/filename.

    What should I back up the files in a different way to be able to use them in a tag?

    Suggestions?

    Thank you!

    Hello

    I solved it, sort of. I used the House instead of dossier_partage and it worked!

    Thx for all the help!

  • Cordova/Phonegap for WebSQL Storage API does not not on BB10

    I use the API of storage for WebSQL to Phonegap with BB10 but his does not work.

    And not able to see the logs in the web Inspector. I have test code on system Z10 bb OS 10.2.

    And cordova 3.1.

    Is there a sdcard is required in the device? Currently, there is no SD card in my camera.

    Or is there any other requirements. Please help me as soon as POSSIBLE.

    Please find my code below:

    index.html

    Sample contact

    Example of

    Database

    You use the document originally of a variable

    window.addEventListener('load', function () {
        document.addEventListener('deviceready', onDeviceReady, false);
    }, false);
    
  • Custom BB Webworks/Phonegap plugin for BB10

    Hello

    Can you please help me how to write Custom BB Webworks/Phonegap plugin for BB10? I knew for BB Java Smartphone (phonegap plugins).

    Hello

    We are working on the construction of full support for plugins to cordova, but for now, you must create a WebWorks extension and import it on the folder your PhoneGap project www.

    Here is a model to help you get started:

    https://github.com/BlackBerry/WebWorks-community-APIs/tree/master/BB10/template

  • PhoneGap / app example Cordova not launching by BB10 Simulator

    I am launching a Phonegap "Hello World" example app in the Simulator BB10.

    As much as I fear, everything has been done correctly. The icon sets even on the home screen, but when I run it I get a black screen with the BB 10 logo in the background and it just hangs.

    See photo:

    I changed the 'project.properties' file in the project by adding the IP address of the Simulator and pointing to the SDK software WebWorks BB 10.

    I do not add the password BB 10 Simulator, because as far as I am concerned it is not a.

    I followed all the directions on Apache Cordova heredocumentation.

    Any help would be appreciated!

    Thanks in advance!

    OK, the problem is that I didn't use the default setting for the installation of the SDK. You MUST use the parameter by default when you install the SDK software to:

    / Developer/SDK/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.4.5

  • Development of a PhoneGap Plugin for BB10 (QNX)

    Hi all

    I'm playing a bit with phonegap 2.5 just to understand how it works with BB10... In addition to the basic steps, I still don't understand what I need to do in case I need to create a plugin custom..., according to the documentation, it seems that the reference language is Java, but as far as I know, the native extensions for BB10 must be developed in C++ and I strongly suspect that Java is for the old version of BB (torch etc.)

    Even if I dig into the sample project located within the archive zip Phonegap, I can't understand how extensions can be made.

    Can someone help me on this?

    Thank you very much

    -marco

    Hi Marco,.

    Yes, you are right! Once we have aligned with cordova, you will still generate native code in the same way, but we allow you to package it as a plugin of cordova rather WebWorks extension.

  • How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Hi all

    How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Thank you all

    Here is a link to the documentation specifically: http://docs.phonegap.com/en/2.6.0/guide_plugin-development_index.md.html

    We will update the things little when we adopt a more close relationship with Cordova.

  • When porting from iOS to WebWorks BB10/7, I have to keep phonegap?

    Hello

    I just get to work for an iOS phonegap app over ports at BB WW and I was wondering: is keeping phonegap is necessary or wise?

    The old app on iOS using phonegap 2.2 (recently upgraded to a very old version) and some plugins such as mapkit (uses that much, I can't just drag the mapping features - like view location on map and directions).

    Aura of the maintenance phonegap and using a version of BB of mapkit (when it exists) be easier than just porting to WebWorks?

    Also keep in mind that I want to port BB10 and OS7 and can - if it's easy - OS5 - 6 and I don't want to have very different code base for different versions of the BB OS.    I already have an older version of java application running on OS4 - 6, but it would be nice to put a new version for old devices also.

    I only did a webworks app but then I don't know much but so sorry if it's a bad question.

    Thank you

    PhoneGap/Cordova supports BlackBerry by calling WebWorks. Cordova doesn't support BB10 until 2.3.0 or 2.4.0, if so you need to update if you want to use. We're going to do also all Cordova the way standard and official to create HTML5 on BB10 applications, so stick to Cordova is sustainably good thing.

    However, I am not aware if there is a port on BB10 mapkit. Certainly, you can do the mapping, but you may need to take one of our samples of mapping and wrap it up in the same API if you want it to run perfectly.

    Now, porting to OS7 should be OK, but when you talk to will OS5 and 6, you may encounter more problems. At this point, those are very old devices. The engine of the browser in them is a good few years old - OS5 does not also WebKit. Memory and processors are half of what's available in devices OS7. You have to be very effective to make it work as you want.

    It is difficult to give really good advice without knowing your target market, demographics, and the region, and what kind of features you want to deliver (in addition to the maps). These factors will determine what kind of userbase you can expect on the different versions of the OS, and that it is better to port PhoneGap version for old phones, or update the Java version. Take a look at the BlackBerry World user stats that we publish and your own user base numbers. Generally, we found that users with the latest hardware equipment are also those who buy apps or spend money on them, and those with more recent or fairly recent devices is those who download. Make sure that you balance the available opportunity development times.

  • PhoneGap Build InappBrowser - what am I doing wrong?

    I was faced with calls to plugins cordova of in my App. Basically, I use phonegap as a wrapper to load a CMS site. This issue has many sub-questions, so please excuse me if I take a wandering approach.

    I had originally planned to help Inappbrowser - but now I would like to support downloads (which it seems to me that Inappbrowser does not).

    Can I charge my external website in an Iframe? Looks like Iframes are bad because of compatibility.

    If I try to load my external site via an Iframe, I get an empty frame - what gives to think that something is wrong with my white list.

    Here's index.html file. I use inappbrowser here (with location defined or not).

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml " >

    < head >

    < title > Emerald Test App < /title >

    < name meta = "apple-mobile-web-app-compatible" content = "yes" / >

    < name meta = "viewport" content = "width = device-width" / > "

    < script src = "phonegap.js" > < / script >

    < / head >

    < script type = "text/javascript" >

    iabRef = window.open ('https://my-sites-url.com/content.aspx?page_id=31"," _self"," location = no "");

    iabRef.addEventListener ('loadstart', iabLoadStart);

    iabRef.addEventListener ('loadstop', iabLoadStop);

    iabRef.addEventListener ('loaderror', iabLoadError);

    iabRef.addEventListener ("quit", iabClose);

    < /script >

    < body >

    < / body >

    < / html >

    Here is my Config

    <? XML version = "1.0" encoding = "UTF-8"? >

    < widget xmlns = " " http://www.w3.org/ns/widgets "

    xmlns:gap = " " http://PhoneGap.com/ns/1.0 "

    ID = "com.my - site - url.testapp.

    versionCode = '5 '.

    version = "1.0.4" >

    Test App < name > < / name >

    < description >

    An application specially designed for your organization

    < / description >

    " < author href = ' https://www.my-site-URL.com "email =" " [email protected] "> "

    My application

    < / author >

    < name of gap: platform = "ios" / >

    < name of gap: platform = "android" / >

    < name of gap: platform = "winphone" / >

    < name of option = "orientation" value = "default" / >

    < name of option = "phonegap-version" value = "cli - 6.3.0" / >

    < name of option = "full screen" value = "false" / >

    < name of option = "loadUrlTimeoutValue" value = "700000" / >

    < option name = "LoadingDialog" value = "Please wait, the application will load" / >

    < name of option = "AllowInlineMediaPlayback" value = "true" / >

    < name of option = "SplashScreenDelay" value = "7000" / >

    < name of option = "KeepRunning" value = "true" / >

    "< src="res/icon/android-icon-36x36.png icon "gap: platform = gap: qualifier 'android' ="ldpi"/ >

    "< src="res/icon/android-icon-48x48.png icon "gap: platform = gap: qualifier"android"="mdpi"/ >

    "< src="res/icon/android-icon-72x72.png icon "gap: platform = gap: qualifier 'android' ="hdpi"/ >

    "< src="res/icon/android-icon-96x96.png icon "gap: platform = gap: qualifier 'android' ="xhdpi"/ >

    "< src="res/icon/apple-icon-57x57.png icon "gap: platform ="ios"width ="57"height ="57"/ >

    "< icon src="res/icon/apple-icon-72x72.png "gap: platform ="ios"width ="72"height ="72"/ >

    "< icon src="res/icon/apple-icon-76x76.png "gap: platform ="ios"width ="76"height ="76"/ >

    "< src="res/icon/apple-icon-114x114.png icon "gap: platform ="ios"width ="114"height ="114"/ >

    "< src="res/icon/apple-icon-144x144.png icon "gap: platform ="ios"width ="144"height ="144"/ >

    "< src="res/icon/apple-icon-120x120.png icon "gap: platform ="ios"width ="120"height ="120"/ >

    "< src="res/icon/apple-icon-152x152.png icon "gap: platform ="ios"width ="152"height ="152"/ >

    "< src="res/icon/android-icon-72x72.png icon "gap: platform ="webos"/ >

    "< src="res/icon/android-icon-48x48.png icon "gap: platform ="winphone"/ >

    "< src="res/icon/apple-icon-180x180.png icon "gap: Platform = 'winphone" gap: role = "background" / >

    "< src="res/screen/default.png gap: splash "/ >

    "< src="res/screen/default.png gap: splash "gap: platform = gap: qualifier 'android' ="port-ldpi"/ >

    "< src="res/screen/mdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-mdpi"/ >

    "< src="res/screen/hdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-hdpi"/ >

    "< src="res/screen/xhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xhdpi"/ >

    "< src="res/screen/xxhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xxhdpi"/ >

    "< src="res/screen/xxxhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xxxhdpi"/ >

    "< src="res/screen/default.png gap: splash "gap: platform ="ios"width ="320"height ="480"/ >

    "< src="res/screen/640x960.png gap: splash "gap: platform ="ios"width ="640"height ="960"/ >

    "< src="res/screen/640x1136.png gap: splash "gap: platform ="ios"width ="640"height ="1136"/ >

    "< src="res/screen/750x1334.png gap: splash "gap: platform ="ios"width ="750"height ="1334"/ >

    "< src="res/screen/768x1024.png gap: splash "gap: platform ="ios"width ="768"height ="1024"/ >

    "< src="res/screen/1242x2208.png gap: splash "gap: platform ="ios"width ="1242"height ="2208"/ >

    "< src="res/screen/default.png gap: splash "gap: platform ="winphone"/ >

    < name of the ditch: plugin = 'cordova-plugin-camera' spec = "0.3.6" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-media-capture" spec = "1.0.1" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-device' source = 'MNP' / >

    < name of the ditch: plugin = "cordova-plugin-device-orientation" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-device-motion' source = 'MNP' / >

    < name of the ditch: plugin = source "cordova-plugin-file" = "MNP" / >

    < name of the ditch: plugin = source "cordova-plugin-file" = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-transfer files' source = 'MNP' / >

    < name of the ditch: plugin = spec 'cordova-plugin-media' = "0.2.16" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-inappbrowser" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-globalization" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-dialogues" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-vibration' spec = "1.2.0" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-whitelist" source = "MNP" / >

    < allow navigation href = "" * "/ >"

    < allow intention href = "" * "/ >"

    < access origin = "" * "/ >"

    " < allow navigation href = ' http://*.my-site-URL.com " />

    < / widget >

    If downloading and recording is not available through inappbrowser, how can I managed to save files from an external site (which is what I want to look like a native app)?

    On my external site, I tried to open the files by using things like

    window.open(url, '_system');

    And _blank and adding 'location = no' etc, but no dice. Probably because the pages open in the inappbrowser are in sandbox.

    -Is it possible to start a download from an external web page in Inappbrowser using javascript?

    Is my only option to modify the java plugin onappbrowser? Seems sketchy and examples seem to only support iOS.

    Should I use an Iframe? Any ideas why my Iframes would be empty by using the above configuration? I'm doing something wrong?

    If you've read this far, thanks for reading!

    Using the configuration and the index below, I use window.open ('whatever.png', '_system'); and the png is displayed full screen and I have to use the device back button to return to the interface (or on iOS, you're stuck and have to restart).

    That's because window.open() does NOT part of the interface of the inappbrowser plugin. Thus, you do not invoke the inappbrowser plugin and you don't get the system browser to view it.

    Please read and apply the docs of the inappbrowser of the plugin.

    In your html code:

    It is not valid, because you have a script element between the head and the body, which is not validated.

    The code could still 'work', but the result is invalid and therefore not defined/unpredictable.

    On your config:

    -you have a mixture of gap: syntax of the area names and syntax most recent without social fracture: namespace. I suggest you drop the gap: namespace altogether and use the new syntax only.

    -you have specified the portrait and landscape, but lack the splash of landscape.

    -for some plugins (camera and media, for example), you pinned extremely old versions. What did you do for a special purpose?

    - http://*.my-site-url.com"/ > is redundant, since you already have

  • ondeviceready not shooting in application phonegap bb10

    Hello

    I am developing a HTML5, JQuery basic application with corodova (phonegap), but several times, I found that app video plays (which is my fist in html5 section) and then app does not pass to the next article, I guess it's perhaps because of ondeviceready not firing I see newspapers on my debugger like this.

    ondeviceready not fired for more than 5secs.

    Please let me know, how it can be solved.this happens at least 4/10 times.

    Hi all
    This problem is now resolved.
    It is because in our application, I was first playing a video via the html5 video tag then go index.html, which stops because of error 'onstalled', which is common, so I solved by successcallback that i do the same thing for "onended" video event.
    Here there is no question of Cordoba at all, it was sometimes true, but sound as rare as 1 in 50 times.

  • An error not handled during construction or the app runnning a Cordova/PhoneGap BB10

    I'm trying to implement a project of 10 BlackBerry with Cordova/PhoneGap 3.0.0.

    It took me a long time to understand the Platform for BlackBerry 10 guide actually refers to the version available on http://cordova.apache.org/ and must be installed noted differently on the first page of the site Web PhoneGap.

    I have successfully created a project and added my Z10 camera as target.

    However, when you try to run 'build debug z10' or "run z10" I always get the following error message:

    events.js:72 throw er; // Unhandled 'error' event
    
    Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)
    

    Any solution to this?

    We've tracked down the cause of this error to the tools BlackBerry NDK is missing from the system path.

    After you have installed the BlackBerry native SDK, tools must be added to your system path. Manually add the bin directory to your path, or run the following scripts in the directory where you installed the NDK:

    Windows

    bbndk - env.bat

    Linux/Mac

    source bbndk - env.sh

    Note: the script execution will only add tools to your path for the current shell. If they persist, you must add the path to the bin directory using the Windows or Linux/Mac bash profile environment settings.

  • BB10 - interaction with a childwindow

    Hi all

    I have a child with interaction with a window problem.

    I developed an application with phonegap (2.7.0) and I'm trying to make a paypal payment in my application.

    This requires to open a child window to display the connection at Paypal and after checking paypal redirect me to what I want.

    My problem is that I have no way of knowing if the transaction is completed and when to close the window.
    Ideally, I would like to read the url inside the childwindow to act accordingly, but once I opened my window, I can't do anything in it.

    So here is my appeal:

    childwindow = window.open('https://www.sandbox.paypal.com/webscr?cmd=_express-checkout-mobile&token='+token, '_blank');
    

    My childwindow object contains managers of loadstart, loadstop and output.

    I suspect that the inAppBrowser of phonegap is just useless and prevents me from using the childbrowser good webworks.

    Anyone had this problem before?

    Thank you

    Hi Erik, thanks for your response.

    I finally solved my problem: the new phonegap feature inAppBrowser.

    Since Cordoba 2.3.0 introduced a childBrowser based on one of the previous plugins. Problem is that if it works pretty well on Android and iOS, they have not spent time at all on Blackberry, I would say. Their instance replace the webworks one, but on this one, you cannot run any code in the child window, so no way of knowing the location currently.

    I disassembled this inAppBrowser in the Cordoba code relief on the webworks on blackberry and everything is okay now: finally access the location.href and use a setInterval to close the window after redirect as suggested by Erik.

    Hope this will help people to this question too.

  • What is your HTML5 BB10 Office as development workflow?

    What is your HTML5 BB10 Office as development workflow?

    The amount of time it takes to perform the debugging/save/construction/installation/reboot/test is too long.

    There was such a thing as emulator ripple and I see now Chrome has the development tools Mobile http://www.html5rocks.com/en/tutorials/developertools/mobile/ which is in a similar field.

    It seems that all that really need to happen is that some responsible, special *.js files to emulate each gross API platforms (so there is no JS error during execution of the API).  They don't even have to implement the function in a first time, just provide an API stub, logs the call of API, params and message "not implemented by emulation API".

    Then a large part of the application could be developed on the desktop before you need to install it on the Simulator or a real device.

    This request is so what exactly is your workflow that allows you to make the most of the field work in the application.

    We talk to the era of today (June 2014), WebWorks 2.1, Cordova 3.5.x etc...

    A lot of my development tends to be in the desktop browser (e.g. Chrome; for its great developer tools.) Especially when it comes to the UI and others. Really, until I'm leveraging Cordova (incl. WebWorks, Phonegap, etc..) API, all my work is done there.

    Cordoba has a mastery of 'serve' which will host in fact your content on a web server. So if your config.xml file is pointing to this web server (instead of the local index.html file) you can just use 'cordova serve' to start the server and 'cordova prepare' to update the server with all changes made to its files.

    In this way, just run you this command on your PC, refresh (restart) the app and the new changes are turned on without requiring continuous re - installed.

    There is information on it here:
    https://developer.BlackBerry.com/HTML5/documentation/v2_1/preview_your_app_from_cmd_line.html

    And note that 'prepare webworks' will update the content, which allows a quick refreshment.

  • And then visualize it PhoneGap/Cordova download file to the device

    I'm doing a magazine app that downloads images to the device for the magazine can be read when offline or with a bad internet connection.

    I use PhoneGap/Cordova version 3.1 with 10 of BlackBerry and plugins file and file transfer. I made a few changes to my code base that runs on Android and iOS since before he could download files on the Simulator. Ensure the directory that I wanted to save the file to exist and access to the file with the path indicated in fs.root.toURL ().

    But now that I got the files uploaded to the device I can't view. On other platforms, I was able to use theFileEntry.toURL () and set it as the source for an img tag. But for BB10 I see only an empty img tag. =/
    The specified local path is: filesystem:local:///persistent/bblogo.png

    I was searched and seen references to disabling sandbox and by saving the file on blackberry.io.shared or blackberry.io.home, but blackberry is not available for me with PhoneGap 3.1. Looking at the native documentation , that I saw that the shared path is/accounts/1000/shared but trying to browse the file system I am told that the path does not exist. (fs.root.getDirectory ('accounts') to start with).

    I have a GitHub repository with what I'm looking for here: https://github.com/gaqzi/phonegap-bb10-file-transfer-test
    The code in question is here: https://github.com/gaqzi/phonegap-bb10-file-transfer-test/blob/master/www/js/index.js#L38

    I also noticed that the size of the file when the download is complete is much larger than the actual size of the file on my computer. And the same code running on iOS I see not enough to increase the size of the file. I don't know if that has to do any.

    To try to combat the current file size wildly different I coded an image 10 x 10 pixels as Base64, she decoded on the device and saved. Now, he pointed out the same size on my computer and the device, but still can not see. The same exercise done on iOS gives me a visible image.

    For the code on the test of Base64, please see my thread Stack Overflow for this: http://stackoverflow.com/questions/19421245/blackberry-10-cordova-phonegap-3-1-filetransfer-image-do...

    I am at a loss what can I do to access the files I created, anyone has an idea?

    Hello

    The patch for the cordova file api is still ongoing. Until that of land, here is an example for download of an image and inject it into the DOM. It uses XHR, but the filetransfer plugin should work as well.

    https://gist.github.com/jeffheifetz/c1127b4d3e132ffff972

    You will need to 'blackberry.io', which is available as plugin PhoneGap/Cordova here:

    https://github.com/BlackBerry/Cordova-BlackBerry-plugins/tree/master/plugin/com.BlackBerry.IO

    The patch will automatically update toURL so that it returns the full path which has been hard-coded in the example.

Maybe you are looking for