Skip to content

PhoneTap: give all the PhoneTap js methods to do some testing or develop outside the simulator

Notifications You must be signed in to change notification settings

elcuervo/phonetap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhoneTap

PhoneTap

PhoneTap attemps to mock all the PhoneGap behaviour to be able to develop applications without testing anything in the simulator

What is this?

A way of developing lib or tools for PhoneGap without to include it or run a simulator. All the methods (including the non-simulator friendly like 'camera') are included.

Install?

You can include the javascript if you develop with a browser

<script type="text/javascript" src="https://raw.github.com/elcuervo/phonetap/master/lib/phonetap.js"></script>

Or you can use the npm package

$ npm install phonetap

Usage within Nodejs

var phonetap = require('phonetap');
var Camera = phonetap.Camera;
var navigator = phonetap.PhoneTap;

Usage in a browser

Just substitute or route the phonegap.js file with phonetap.js and that's it! now you can use all the fancy tools from PhoneGap

navigator.geolocation.getCurrentPosition(function(position){
  alert(position.coords.longitude);
});

About

PhoneTap: give all the PhoneTap js methods to do some testing or develop outside the simulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published