phonegap build, connection plugin to check network connection - phonegap-plugins

I am developing an HTML/CSS/JS app with Phonegap Build (using phonegap 2.9.0) and I am trying to check the network connection of the device.
I included the plugin in the config.xml file like this :
<gap:plugin name="org.apache.cordova.network-information" />
But when I compile on Phonegap Build I get :
plugin unsupported: org.apache.cordova.network-information
Can you help me figure this out?
I am not sure I want to updgrade to phonegap version 3.0.0 because it doesn't support Blackberry...

it seems that Phonegap 2.9.0 doesn't need to load this plugin, like other core plugins :
http://community.phonegap.com/nitobi/topics/phonegap_build_plugin_unsupported_org_apache_cordova_network_information?rfm=1

You don't need to use a plugin. Providing you are creating this app in HTML5 and Javascript, you can simply call the function:
if navigator.onLine; <!--PERFORM A FUNCTION--> else;
Read more on it here:
http://www.w3schools.com/jsref/prop_nav_online.asp
Worked for me on my phone gap build.

Related

Cordova Crosswalk: installation of Andoird-apk failed

I'm using cordova-plugin-crosswalk-webview-v3 to create android app with a build-in browser as standard webview in my app.
Cordova can create very simple a android app without any problem. As I added crosswalk (latest version) in cordova, my export are in 2 versions: arm64 and x86_64.
The problem is I cannot install both created apps on my android-device or emulator of android-studio.
I have 2 kind of errors:
first:
after importing the .apk in android-studio : .*so missing
second
after try to running app: INSTALL_FAILED_NO_MATCHING_ABIS
can somebody help me to solve this problem? I also read some issues on github of crosswalk, but they are not interested to replay their issues.
Thank you for your help!
The solution is to set android-minSdkVersion in config.xml to the latest version, like 28. Also just add this code in your config.xml and build the app via cordova build android again:
<preference name="android-minSdkVersion" value="28" />
After that there is a new apk-output, which names debug.apk. This apk is universal and can run on any devices.

Chrome packaged app and Android NDK

Is it possible to have a Chrome packaged app for Android also include a module built with the Android NDK, and then communicate between the app's javascript and the native NDK module?
Because PNaCl is not yet available for Android, I'm looking for another way to bring C code to that platform also, in place of the PNaCl module that I have for the other platforms.
You can install cordova plugins using the cca tool, and cordova plugins can bundle ndk components. However, there is no utility/project that I know of to help you get started build ing the android ndk -> cordova android -> cordova js.
I don't think it should be hard, especially if you've done cordova/phonegap plugin development before.

PhoneGap 3.1 Local Build WP8

I'm trying to play with new phonegap-cli main focus is to setup wp8 platform
and when running command:
phonegap build wp8
It tries to use PhoneGap Build, which I presume happens because it hasn't found
my installed SDK in any path.
I tried to test my thesis and ran this command:
phonegap local build wp8
And it returns this error:
I have .NET Framework v4.0 installed, so this path exists:
C:\Windows\Microsoft.NET\Framework\v4.0.30319
So the only thing I think happens is that phonegap can't find where SDK is installed,
so I have been searching through the documentation and I couldn't find anything regarding which Environment Variable PhoneGap checks.
So I would really appreciate any kind of help here.
Please make sure that you have added the framework path to the system PATH variable.
In my case it was the above reason and also related to Ant installed and configuration.
Alternatively you can use phonegap's online build service:
https://build.phonegap.com/
It works like a charm and is free for 1 private project.

Phonegap in Visual Studio 2012 : how to use console.log?

I'm using PhoneGap 3.0.0 and I need to debug a Windows Phone 8 App.
The PhoneGap WP8 documentation is outdated since it's about a downloaded version though NodeJS seems to be mandatory with version 3.0.0.
I can open the project generated by PhoneGap with VS2012 but I don't see any log in the console... Did anybody have the same problem ?
PhoneGap WP8 doc: http://docs.phonegap.com/en/edge/guide_platforms_wp8_index.md.html#Windows%20Phone%208%20Platform%20Guide
I've found the solution: you need to run the application in debug mode (unlike android).
During the Debugg process, go to Debug>Window>JavaScript Console or press Strg+Alt+V
Now you must see the console.log output

Xcode with phonegap provide build error

I have installed phonegap on MAC and installed Xcode 3.1. then open codex and create new project and built and ruis target might include its own product. build failed. give me a solution to this
Do you have a provisioning profile installed on the iPhone you are trying to run it on? For me it sounds you don't have the signing correctly.

Resources