GithubHelp home page GithubHelp logo

iarnaud / phonegap-plugin-wizutils Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wizcorp/phonegap-plugin-wizutils

0.0 1.0 0.0 7.97 MB

PhoneGap plugin for general utility functions to access information from the native OS.

License: MIT License

phonegap-plugin-wizutils's Introduction

PLUGIN:

phonegap-plugin-wizUtils phonegap version : 2.3
last update : 11/01/2013

DESCRIPTION :

PhoneGap plugin for general utility functions to access information from the native OS.

CHANGELOG:

  • Updated to Cordova 2.3

KNOWN ISSUES:

  • None.

INSTALL (iOS):

Project tree


www
    / phonegap
        / plugin
            / wizUtils
                / wizUtils.js
ios
    / project
        / Plugins
            / wizUtils
                / wizUtils.h
                / wizUtils.m

1 ) Arrange files to structure seen above.

2 ) Add the following line to config.xml in the plugins section;

3 ) Add <script> tag to your index.html
<script type="text/javascript" charset="utf-8" src="phonegap/plugin/wizUtils/wizUtils.js"></script>
(assuming your index.html is setup like tree above)




# EXAMPLE CODE : #

Get App File Name

wizUtils.getAppFileName(Function success);
* returns String eg. "game.app"(iOS) or "game.apk" (Android)

Get Bundle Version

wizUtils.getBundleVersion(Function success); 
* returns String eg. "1.0.0"

Get Bundle Display Name

wizUtils.getBundleDisplayName(Function success); 
* returns String eg. "bundleDisplayName" ''

Get Bundle Identifier

wizUtils.getBundleIdentifier(Function success);
* returns String eg. "com.bundle.identifier"

Get Device Height

wizUtils.getDeviceHeight(Function success); 
* returns Int eg. 480

Get Device Width

wizUtils.getDeviceWidth(Function success); 
* returns Int eg. 320

Get Text

wizUtils.getText(Function success, Function failure);
* returns String (current clipboard/clipbuffer text)

Set Text

wizUtils.setText(String text, Function success, Function failure);
* Sets the current clipboard/clipbuffer text

Restart

wizUtils.wizUtils.restart(Boolean true/false);
* Restart the app.
* If a boolean value of true is passed, the splash screen will be shown.
* If a boolean value of false is passed, the splash screen will not be shown.
* If a boolean value is not provided:
*   If the AutoHideSplashScreen key is set to YES in the Cordova.plist file.
*   Otherwise, the splash screen will not be shown.

phonegap-plugin-wizutils's People

Contributors

aogilvie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.