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

@elastosfoundation/elastos-cordova-plugin-intent

v2.0.2

Published

Elastos Cordova Intent Manager Plugin

Downloads

31

Readme


title: IntentManager description: This is an plugin for Elastos Cordova in order to manage external inter-app communications through "intents".

@elastosfoundation/elastos-cordova-plugin-intent

This plugin defines a global cordova.intentManager object, which provides an API for intent manager library.

Although in the global scope, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(intentManager);
}

Usage

In typescript file

declare let intentManager: IntentPlugin.IntentManager;

Installation

    cordova plugin add @elastosfoundation/elastos-cordova-plugin-intent

Cofigure

tsconfig.app.json

    "types": [
        "@elastosfoundation/elastos-cordova-plugin-intent"
        ]

config.xml

  • Specific IntentRedirecturlFilter, with custom scheme for android vs https url for ios. such as
    <platform name="android">
        <preference name="IntentRedirecturlFilter" value="XXX://" />
        <config-file parent="/manifest/application/activity" target="AndroidManifest.xml">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="XXX" />
            </intent-filter>
        </config-file>
    </platform>

    <platform name="ios">
        <preference name="IntentRedirecturlFilter" value="https://XXX.sample.net" />
        <config-file parent="com.apple.developer.associated-domains" target="*-Debug.plist">
            <array>
                <string>applinks:XXX.sample.net</string>
            </array>
        </config-file>
        <config-file parent="com.apple.developer.associated-domains" target="*-Release.plist">
            <array>
                <string>applinks:XXX.sample.net</string>
            </array>
        </config-file>
    </platform>
  • About such as "XXX.sample.net" configuring in ios please reference: https://developer.elastos.org/build/elastos/trinity-native/quick_start/#configuring-your-domain-for-ios-apps

  • In android platform, need add "AndroidLaunchMode = singleTask" for receive external intent in the same activity.

    <platform name="android">
        <preference name="AndroidLaunchMode" value="singleTask" />
    </platform>

Supported Platforms

  • Android
  • iOS

Classes

Typedefs

IntentManager

Kind: global class

appManager.sendIntent(action, params, onSuccess, [onError])

Send a intent by action.

Kind: instance method of IntentManager

| Param | Type | Description | | --- | --- | --- | | action | string | The intent action. | | params | Object | The intent params. |

appManager.addIntentListener(callback: (msg: ReceivedIntent)=>void)

Set intent listener for message callback.

Kind: instance method of IntentManager

| Param | Type | Description | | --- | --- | --- | | callback | (msg: ReceivedIntent)=>void | The function receive the intent. |

appManager.sendIntentResponse(action, result, intentId, onSuccess, [onError])

Send a intent respone by id.

Kind: instance method of IntentManager

| Param | Type | Description | | --- | --- | --- | | action | string | The intent action. | | result | Object | The intent respone result. | | intentId | long | The intent id. |

ReceivedIntent : Object

Information about an intent request.

Kind: IntentPlugin typedef Properties

| Name | Type | Description | | --- | --- | --- | | action | string | The action requested from the receiving application. | | params | any | Custom intent parameters provided by the calling application. | | intentId | number | The intent id of the calling application. | | originalJwtRequest? | string | In case the intent comes from outside essentials and was received as a JWT, this JWT is provided here. |