What code can switch ON the flashlight in iPhone?

6 posts, 0 answers
  1. Nitish
    Nitish avatar
    7 posts
    Member since:
    Aug 2013

    Posted 21 Nov 2013 Link to this post

    Hi guys,

    I have been working on an app that uses the flash as a flashlight in iPhones. Im wondering what code would switch ON the flashlight. 

    Cheers
    Nitish
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 21 Nov 2013 Link to this post

    Hi Nitish,

    Cordova API does not expose out of the box way for working with devices that have flash light. However there are custom Cordova plugins that do this e.g.: Flashlight-PhoneGap-Plugin.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Nitish
    Nitish avatar
    7 posts
    Member since:
    Aug 2013

    Posted 21 Nov 2013 Link to this post

    Hi Steve,

    Thanks for this. I have seen couple of these plugins for the past hours. However, I cant seem to figure out on how I will install this in my icenium. I tried replacing my files and working out its directories, but still no Luck :(

    Cheers
    Nitish
  4. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 22 Nov 2013 Link to this post

    Hello Nitish,

    How did you download and install the plugin to your project? You should use the Download Zip button, and then just follow the instructions from the following post: Import Custom Plugins.

    I've made a sample that uses that plugin for your convenience, you can follow the guidance to clone a sample app and then run the app on your device.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  5. Nitish
    Nitish avatar
    7 posts
    Member since:
    Aug 2013

    Posted 22 Nov 2013 Link to this post

    Hi Steve,

    Thanks Steve! I'm excited to try this out tomorrow morning. Will update you with the results.

    Cheers
    Nitish
  6. Jason
    Jason avatar
    1 posts
    Member since:
    Oct 2015

    Posted 02 Dec 2015 in reply to Nitish Link to this post

    Nice job.  Works just beautifully and I was able to blend into existing app. 
Back to Top