Showing posts with label phonegap. Show all posts

Splash Screen in PhoneGap


First you will need to add cordova splash screen plugin.
Open terminal and type command

$ cordova plugin add cordova-plugin-splashscreen
now open config.xml file and add the following entries in this file
<preference name = "SplashScreen" value = "screen" />
// how long splash screen will be displayed
<preference name = "SplashScreenDelay" value = "3000" />
//If SplashMaintainAspectRatio value is false image will get  stretched
<preference name = "SplashMaintainAspectRatio" value = "true" />

Build your app and emulate.

Installing PhoneGap/Cordova on Linux



 Step 1

Install JDk
Open terminal and type following commands
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
 

Step 2 

Download the appropriate Android SDK package from here. Extract the downloaded files.
now open /etc/bash.bashrc file add the following lines
export ANDROID_HOME=/path/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/bin
and install Android build tools

Step 3

Install Apache Ant by typing this command on terminal
sudo apt-get install ant

Step 4 

 Install npm Package Manager
 sudo apt-get install npm

Step 5

Install PhoneGap and Cordova
sudo npm install -g phonegap

sudo npm install -g cordova

Step 6

create android virtual device from Android studio/Eclipse and Phonegap development environment is all set to start with PhoneGap