npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

appvuze

v0.2.8

Published

appVuze In-app Customer Support Plugin for PhoneGap/Cordova

Downloads

22

Readme

appVuze In-app Customer Support Plugin for PhoneGap/Cordova

Login at https://appvuze.io - manage users, applications, and support your mobile app users

Bitcode vs. No-Bitcode - please read

appVuze.framework included in this repo does not contain bitcode for space considerations. If you distribute your application via the Apple App Store with bitcode enabled, then please download appvuze-phonegap-cordova-plugin from here and unzip it on your local harddrive: https://www.dropbox.com/s/qbev5xdj7f2re3s/appvuze-phonegap-cordova-plugin-0.2.7-bitcode.zip?dl=1

Installation

Project Structure

Usage Example. First, import plugin into your Cordova/PhoneGap app as follows:

$> cordova create AppVuzeTest
$> cd AppVuzeTest
$> cordova platform add ios
$> cordova platform add android
$> cordova plugin add appvuze, *or*
$> cordova plugin add <path-to-appvuze-phonegap-cordova-plugin-with-bitcode>
$> cordova prepare
$> cordova build --device

Required changes to include appVuze plugin in your Cordova/PhoneGap app:

CDVAppVuze.m:

- (void)initializeSdk:(CDVInvokedUrlCommand*)command
{
    // Replace YOUR_APPLICATION_KEY with a key obtained from https://appvuze.io dashboard
    // Remember to enclose application key string in @""
    [appVuze initializeSdkWithApplicationKey:YOUR_APPLICATION_KEY];
}

CDVAppVuze.java:

    private void executeOnUiThread(String action, JSONArray args, CallbackContext callbackContext) throws JSONException
    {
        if (action.equals(ACTION_INITIALIZE_SDK))
        {
            // Replace YOUR_APPLICATION_KEY with a key obtained from https://appvuze.io dashboard
            // Remember to enclose application key string in ""
            appVuze.initializeSdk(cordova.getActivity(), YOUR_APPLICATION_KEY);
        }

Index.js:

var app = {
    // Application Constructor
    initialize: function() {
        this.bindEvents();
    },
    // Bind Event Listeners
    //
    // Bind any events that are required on startup. Common events are:
    // 'load', 'deviceready', 'offline', and 'online'.
    bindEvents: function() {
        document.addEventListener('deviceready', this.onDeviceReady, false);
    },
    // deviceready Event Handler
    //
    // The scope of 'this' is the event. In order to call the 'receivedEvent'
    // function, we must explicitly call 'app.receivedEvent(...);'
    onDeviceReady: function() {
        app.receivedEvent('deviceready');

        var helpButton = document.getElementById('help-me');
        helpButton.addEventListener('click', app.launchAppVuze, false);

        var appvuze = window.cordova.require("cordova/plugin/CDVAppVuze");
        if (appvuze != null) {
            appvuze.initializeSdk();
        } else {
            alert('error!');
        }
    },
    // Update DOM on a Received Event
    receivedEvent: function(id) {
        var parentElement = document.getElementById(id);
        var listeningElement = parentElement.querySelector('.listening');
        var receivedElement = parentElement.querySelector('.received');

        listeningElement.setAttribute('style', 'display:none;');
        receivedElement.setAttribute('style', 'display:block;');

        console.log('Received Event: ' + id);
    },
    launchAppVuze: function() {
        var appvuze = window.cordova.require("cordova/plugin/CDVAppVuze");
        if (appvuze != null) {
            appvuze.beginHelpSession('John', {accountNumber:'1234567890', userEmail:'[email protected]'});
        } else {
            alert('error!');
        }
    }
};

app.initialize();

Config.xml:

<feature name="AppVuze">
    <param name="ios-package" value="CDVAppVuze" />
</feature>

Index.html:

<html>
    <head>
        <!--
        Customize this policy to fit your own app's needs. For more guidance, see:
            https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy
        Some notes:
            * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication
            * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
            * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
                * Enable inline JS: add 'unsafe-inline' to default-src
        -->
        <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <title>Hello World</title>
    </head>
    <body>
        <div class="app">
            <h1>Apache Cordova</h1>
            <div id="deviceready" class="blink">
                <p class="event listening">Connecting to Device</p>
                <p class="event received">Device is Ready</p>
            </div>
            <div>
                <button id="help-me">Help me!</button>
            </div>
        </div>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
    </body>
</html>