Cordova

How to lock screen orientation to portrait or landscape?

This article will show you how to lock screen orientation to one direction.
Environment Details:
– Phonegap Build – cli-5.2.0
– Device: iPhone S5 9.3.2

For locking orientation to portrait add following code into your config.xml:

For Landscape:

Source: https://github.com/phonegap/build/issues/263 […]

Android: How to generate key hash for Android Facebook?

In order to generate key hash you need to follow some easy steps.

1) Download Openssl from: here.

2) Make a openssl folder in C drive

3) Extract Zip files into this openssl folder created in C Drive.

4) Copy the File debug.keystore from .android folder in my case (C:\Users\SYSTEM.android) and paste into JDK bin Folder in my case (C:\Program Files\Java\jdk1.6.0_05\bin)

5) Open command prompt […]

Cordova: How to download file and get download progress?

  […]

Cordova: How to check if a file exists or not?

Above code works for both files and directories.

For Full article with extended features visit Following:
Cordova Sample: Check for a file and download if it isn’t there

Click here for Complete Documentation of cordova.file plugin

  […]

Cordova: How to get list of all Files/Directories in a directory?

Tested in Android.

Click here for more details.

Another link Mobile File Explorer with PhoneGap/Cordova has examples. […]

Cordova: How to create directory?

For Documentation Visit: https://www.npmjs.com/package/cordova-plugin-file#android-file-system-layout […]