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

@magic-change/react-native-msa

v4.2.1

Published

react-native library for msa

Downloads

4

Readme

react-native-msa

npm version

SDK Version 1.2.1

开始

$ npm install react-native-msa --save

如果react native 版本小于0.6X,还需要执行 react-native link react-native-msa

注意

supplierconfig.json拷贝到项目android/app/src/main/assets目录下。(暂时不用修改,只需原样放到assets目录下即可,这个是给未来做准备的。如果想要使用VAID,可修改里边对应内容,特别是需要设置appid的部分,要去对应厂商的应用商店里注册自己的app,来获取对应appid。)

集成

打开项目中的 MainApplication.java

public class MainApplication extends MultiDexApplication implements ReactApplication {

	....
	....
	....

	@Override
    public void onCreate() {
        super.onCreate();
        System.loadLibrary("msaoaidsec"); //加固版本在调用前必须载入SDK安全库,因为加载有延迟,推荐在application中调用loadLibrary方法
}

使用方法

| 方法 | 说明 | | :-----------------: | :---: | | initSDK | 初始化SDK | | isSupport | 是否支持MSA | | getOAID | 获取OAID | | getVAID | 获取VAID | | getAAID | 获取AAID | | isLimit | 补充设备标识符开关 | | addReceiveMsaIdsListener | 增加oaid、vaid等值获取到后的触发监听,会返回所有相关ID等,需在初始化initSDK之前调用 | | removeListener | 移除addReceiveMsaIdsListener这个监听 |

注意:initSDK 成功后不要立马取值,可以延迟50~100毫秒再进行取值(可用addReceiveMsaIdsListener监听解决)

initSDK 返回状态码(字符串)

  • 1 初始化成功
  • 0 cert为空
  • -1 cert初始化失败,一般是证书字符串错误
  • -2 未知错误
  • 1008610 调用成功,获取接口是同步的
  • 1008614 调用成功,获取接口是异步的
  • 1008616 证书未初始化或证书无效
  • 1008611 不支持的厂商
  • 1008612 不支持的设备
  • 1008613 加载配置文件出错
  • 1008615 sdk 调用出错

详见examples目录