@dxd_sjtu/call-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

@dxd_sjtu/call-client

NPM version npm download

中文版文档

What is it:

This is a lib to call a app in h5 env.

Install

$ npm install @dxd_sjtu/call-client --save
$ yarn add @dxd_sjtu/call-client

Init Args:

  • deepLink //URLSchema;
  • intentLink //intent link for android;
  • iosStore //ios's app store link for app
  • androidStore //android's app store link for app

Usage

import CallClient from '@dxd_sjtu/call-client';

const deepLink = 'userschema for your app';
const intentLink = 'intent for your android app';
const iosStore = 'https://itunes.apple.com/app/id785385147?mt=8';
const androidStore = 'https://play.google.com/store/apps/details?id=com.lazada.android';

const callClient = new CallClient(
      deepLink,
      intentLink,
      iosStore,
      androidStore
    );
callClient.callApp();

Behavior:

It will call app at first, if no app is called then it will link to your download link.

TODO:

track config

Readme

Keywords

none

Package Sidebar

Install

npm i @dxd_sjtu/call-client

Weekly Downloads

1

Version

0.1.4

License

ISC

Unpacked Size

26.2 kB

Total Files

16

Last publish

Collaborators

  • dxd_sjtu