gap_bridge_mode prompt when starting a PhoneGap application - android

I am building a Sencha Touch application that I then build using PhoneGap. When I installel the application on my android device for testing I got a strange prompt box asking me to provide a gap_bridge_mode?! What is this and how do I get rid of it (the prompt).
In my current situation I just click the Ok button without providing any value and all works fine. However I cannot release the application with this thing "welcoming" the user.
Please, help!

I think I found what the problem was. In my phonegap config file I indicated the use of phonegap 2.0.0 - the latest available version on the build server - while in the index.html I was loading the 2.1.0 - the latest version available for download.
After I changed index.html to point to version 2.0.0 I don't get this message anymore.
Thanks for the help.

Related

Cordova browser app doesn't recognize cordova.plugins.backgroundMode

I'm making a cordova app and I included the background mode plugin, then i used the line cordova.plugins.backgroundMode according to the official documentation and the app doesn't recognize it. Yes I've included cordova.js before app.js, yes I'm sure the plugin is properly installed since it didn't give any error message while installing it, it appears in the plugin list and I reinstalled it with multiple versions and not a single one works. One thing I found weird is that npm didn't add this plugin to config.xml. Can anyone help with this?
I tried reinstalling the plugin, tried just calling backgroundMode, tried using it on an android phone but it doesn't work.

Ionic Webpage error after Android apk

I just started Learnig Ionic and after a successful deploy of myapp (generate apk and install in my phone), i still get a web page error on my android device 'Could not connect to server (http://localhost:8080/)'
I believe the app should be offline because i haven't used any web service. check out the error here
The url http://localhost:8080/ would only work on the emulator but not on an actual android device.
Find the method webview.loadUrl() most likely on the MainActivity.java and change to something like webview.loadurl("file:///android_asset/www/index.html") instead of webview.loadurl("http://localhost:8080/");
Your app is offline.
A plugin that all Ionic apps have been using for ages, cordova-plugin-ionic-webview, released a new version 2.x on July 23rd 2018. This added a webserver into the Android app that is used to deliver your app files to the webview displaying your app. It runs on localhost:8080.
Unfortunately version 2 of cordova-plugin-ionic-webview does not support Android 4.x any more which you seem to be using. This is the eason why you are getting that error message.
You can probably fix your problem by downgrading to the last version of the plugin that supported Android 4.x:
ionic cordova plugin add cordova-plugin-ionic-webview#1.2.1
More elaborate information and alternative solutions:
https://ionic.zone/debug/ionic-and-android-4

phonegap/android: changes to index.html not being regarded when building the app

I'm making my first steps in phonegap. I've been able to set up a project, install a plugin and build the app on my phone without errors. However, now, when I try to change the layout of my www/index.html in the project's root platforms/android/assets/www/index.html stays untouched whenever I (re)build the app.
I'm basically working in eclipse, only for html and javascript I use sublime. I've searched now for a couple of hours for a solution. The most promising approach was this thread: Changes to HTML files not showing on built phonegap 3.0 app ... but even that didn't work.
What can I have done wrong? There's no error, no warning (none resulting from the build process) and I don't know how I could debug the issue. I'm currently using phonegap/cordova 4.2.0
Any clue? Thanks
I still don't know the reason for my problem. However, installing the app via cordova CLI rather than eclipse seems to have solved the problem:
$ cordova prepare android
$ cordova run android

Cordova and google maps

Well im trying to make simple app which will display map and user location i did everything like in this tutorial http://kendrickcoleman.com/index.php/Tech-Blog/phonegap-cordova-geolocation-integration-with-google-maps-javascript-api-v3.html
I have downloaded cordova.js from github i have correct key and all i can see on my avd is grey-white screen without any map, coudl someone give me a clue what shoudl i change ?
shoudl i add anything to android manifest or to config file ?
Battled with the same issue for 3 days only to discover that http request are blocked in the latest Ionic except a the cordova whitelist plugin is added.
To add whitelist plugin, run the following command:
ionic plugin add cordova-plugin-whitelist

Is the ChildBrowser plugin for Android supposed to run on the emulator?

Is the ChildBrowser plugin for Android supposed to work on the emulator? cuz I think I have everything setup as explained here but I dont have a real device to test it out. When running the app it doesnt trigger it after clicking the button. Ive put some console stuff there and is in fact reaching that point to run the script: window.plugins.childBrowser.showWebPage(url, true););
The iPhone version of the plugin runs beautifully.
btw, Im using the latest version of both phonegap: 0.9.4 and the ChildBrowser plugin. Thanks.
Nevermind :) somehow eclipse -as lazy as can be- needs to be aware of the ChildBrowser.java existence even though it's already there, stored at the proper place within the project!
Right. Eclipse drives the .apk file build so it needs to know about all of the files to include in the build.

Categories

Resources