Giter Site home page Giter Site logo

ecc521 / capacitor-installer-info Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 131 KB

Capacitor plugin to obtain information about the installation source of the application

Ruby 12.02% Java 42.06% Swift 10.60% Objective-C 8.55% JavaScript 6.03% TypeScript 20.74%

capacitor-installer-info's Introduction

capacitor-installer-info

Capacitor plugin to obtain information about the installation source of the application

This plugin ONLY supports Android (methods exist but reject on other platforms when called)! This is because there is not an installer for websites, and the installer for iOS/iPadOS apps is always the App Store.

Note that, if shipping iOS apps for installation on MacOS becomes common, it might be relevant to detect the installation source for iOS apps on MacOS, and jailbroken devices do exist.

Install

npm install capacitor-installer-info
npx cap sync

API

getInstallSourceInfo(...)

getInstallSourceInfo(details: Record<string, string> | undefined) => Promise<Record<string, string>>

Obtain the installation source information for the given package name using PackageManager.getInstallSourceInfo Rejects on non-Android platforms. Returned values may vary by Android API level. Output example: { installingPackageName: "com.android.vending", originatingPackageName: "", initiatingPackageName: "com.android.vending" }

When "" (empty string) is returned, the value was null from the PackageManager API. When no value is returned for a key, the value could not be calculated given the Android API level or for other reasons.

Param Type Description
details Record<string, string> : string} | undefined. If packageName undefined or no object passed, the package name of the current app is used.

Returns: Promise<Record<string, string>>

Since: 6.0.0


Type Aliases

Record

Construct a type with a set of properties K of type T

{ [P in K]: T; }

capacitor-installer-info's People

Contributors

ecc521 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.