Git Product home page Git Product logo

aemm-plugin-application's Introduction

aemm-plugin-application

This plugin defines a global application object, which describes the application version and id. Although the object is in the global scope, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(cq.mobile.application.id);
}

Installation

cordova plugin add aemm-plugin-application

Properties

  • application.id
  • application.version
  • application.runtimeVersion
  • application.pushNotificationToken
  • isSocialSharingEnabled
  • isAppSearchEnabled

Document Events

  • pushnotificationtokenchanged

application.id

Get the id of the application as identified by each platform's store.

Supported Platforms

  • Android
  • iOS
  • Windows

Quick Example

// iOS:     returns the id of the application bundle as
//          identified by the app store.
//          com.exampleCompany.exampleApp
// Windows: returns the main package identity name as
//          identified by the Windows Store.
//          examplePublisher.exampleApp
var string = application.id;

application.version

Get the application's version as defined by the app vendor

var string = application.version;

Supported Platforms

  • Android
  • iOS
  • Windows

Quick Example

//   - "iOS"     3.4.5
//   - "Windows" 3.4.5.6
var runtimeVersion = application.version;

application.runtimeVersion

Get the application's version as defined by Adobe AEM

var string = application.runtimeVersion;

Description

This version is provided to assist Adobe AEM.

Supported Platforms

  • Android
  • iOS
  • Windows

Quick Example

//  - "iOS"     2016.1.1
//  - "Windows" 2016.1.1
var applicationRuntimeVersion = application.runtimeVersion;

application.pushNotificationToken

Get the push notification token for the app and device. If there is no push token the method returns the empty string

var string = application.pushNotificationToken;

Description

Since the push notification token is provided to the device by the device manufacturer in a binary format, this API converts the token to a base64-encoded string

Supported Platforms

  • iOS

Quick Example

// iPhone:     ew0KDQogICAgICAgICAgICBtZS5hdmFp==

var pushNotificationToken = application.pushNotificationToken;

pushnotificationtokenchanged

Event will be fired when the push notification token has changed. Clients should query the application object for the latest value.

Example

document.addEventListener("pushnotificationtokenchanged", updatePushToken, false);

Supported Platforms

  • iOS

aemm-plugin-application's People

Contributors

adzellman avatar bliuadobe 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.