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

cordova-plugin-china-market

v1.3.1

Published

Cordova Plugin for access to Mi Store, Vivo Store, Oppo Store, Honor Store, Huawei Store, Meizu Store, Samsung Store, Google Play and Apple Store within your app

Downloads

13

Readme

cordova-plugin-china-market

Cordova (PhoneGap) 3.0+ plugin to open an application on native Marketplace app aka Mi Store, Vivo Store, Oppo Store, Honor Store, Huawei Store, Meizu Store, Samsung Store, Play Store for Android or App Store for iOS. Currently this plugin is compatible only with Android and iOS. Feel free to add support for the platform you need!

Installation

This plugin follows the Cordova 3.0 plugin spec, so it can be installed through the Cordova CLI in your existing Cordova project:

cordova plugin add https://github.com/CyrusNG/cordova-plugin-china-market

How to use it

When you want to open the device's store do this:

  • For Android use the app's package, default is the app package name:

    Market.open('your.app.package')

  • For iOS, first you need to create an easy-to-read link to your app using App Store Short Links, then use the app name:

    Market.open('yourappname')

This will open the link itms-apps://itunes.apple.com/app/yourappname. Alternatively you can use your app's id that should be similar to id284815942

You can also add a success and failure callback like this:

try {
  await Market.open(appId);
} catch(e) {
  //can NOT find any matched market
}

For Android 11 +

Package visibility was introduced in Android 11 (API level 30) and changes the way apps can query or interact with other apps the user has installed on a device. Using the element, apps can define the set of other packages that they can access.

So Cordova will auto add following into AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">

    <!-- Package Visibility @ Android 11+ (API level 30+)  -->
    <queries>
      <package android:name="com.xiaomi.market" />
      <package android:name="com.bbk.appstore" />
      <package android:name="com.oppo.market" />
      <package android:name="com.hihonor.appmarket" />
      <package android:name="com.huawei.appmarket" />
      <package android:name="com.meizu.mstore" />
      <package android:name="com.sec.android.app.samsungapps" />
      <package android:name="com.android.vending" />
    </queries>

    ...
    ...
    ...
    
</manifest>

Release Notes

Version 1.3.1

  • Removed API to search apps in Play Store

  • Android support Mi Store, Vivo Store, Oppo Store, Honor Store, Huawei Store, Meizu Store, Samsung Store, Play Store

  • iOS support App Store

Version 1.2

  • Added API to search apps in Play Store (supported just in Android)

Version 1.1

  • Fixed issue due to use old iOS url.

Version 1.0

  • Initial release: support for open Play Store or iTunes with an Application ID