Flashlight Application using Phonegap / Apache Cordova

flashlight-application-using-phonegap
flashlight-application-using-phonegap
flashlight-application-using-phonegap

Flashlight application using phonegap / Apache Cordova

Hi Phonegap Developers,

This Simple tutorial explains you how to build a flashlight application using phonegap / apache cordova. Here i’m going to use plugin from https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin

Step by Step Guide for building flashlight application

Step 1 : Create Your Phonegap / Apache Cordova project

Step 2 : Add Your Platform

Step 3 : Add your plugin

cordova plugin add https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin.git

Step 4: Copy & Replace your index.html

function FlashLight(){
 window.plugins.flashlight.available(function(isAvailable){
 if(isAvailable) {
 window.plugins.flashlight.toggle();
 }
 else {
 alert("Flashlight not available on this device");
 }
 });
 }
  • Mohammed Lubbad

    Nice FlashLight App, I test it and its run greatly.
    I want a theme or a design for this app can you guide me.
    Thanks.

    • Hi Mohammed Lubbad,
      You can customize your theme with css file