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

rnkit-fraudmetrix-device

v0.1.0

Published

FraudmetrixDeviceFingerPrinting for react-native

Downloads

18

Readme

npm react-native MIT bitHound Score Downloads

FraudmetrixDeviceFingerPrinting for React Native.

Support me with a Follow

Getting Started

First, cd to your RN project directory, and install RNMK through rnpm . If you don't have rnpm, you can install RNMK from npm with the command npm i -S rnkit-fraudmetrix-device and link it manually (see below).

Android

  • React Native < 0.46 (Using rnpm)

    rnpm install [email protected]

  • React Native >= 0.29

    $npm install -S rnkit-fraudmetrix-device

    $react-native link rnkit-fraudmetrix-device

Manually

  1. JDK 7+ is required
  2. Add the following snippet to your android/settings.gradle:
include ':rnkit-fraudmetrix-device'
project(':rnkit-fraudmetrix-device').projectDir = new File(rootProject.projectDir, '../node_modules/rnkit-fraudmetrix-device/android/app')
  1. Declare the dependency in your android/app/build.gradle
dependencies {
    ...
    compile project(':rnkit-fraudmetrix-device')
}
  1. Import import io.rnkit.fraudmetrix.devicefingerprinting; and register it in your MainActivity (or equivalent, RN >= 0.32 MainApplication.java):
@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new FraudmetrixDeviceFingerPrinting()
    );
}

Finally, you're good to go, feel free to require rnkit-fraudmetrix-device in your JS files.

Have fun! :metal:

Basic Usage

Import library

import FraudmetrixDeviceFingerPrinting from 'rnkit-fraudmetrix-device'

Authentication

iOS

Privacy - Location When In Use Usage Description: 我们需要通过您的地理位置信息获取您周边的相关数据
Privacy - Contacts Usage Description: 是否允许此App访问你的通讯录?

Android

<uses-sdk android:minSdkVersion="8"/>
<!-- 必选权限 -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<!-- 可选权限,不声明此部分权限将放弃部分设备信息的采集,对数据分析及设备指纹的精准度有一定影响 -->
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application>
    <!-- 您的合作方标识 -->
    <meta-data android:name="PARTNER_CODE" android:value="partner" />
    <!-- !!!注意!!! 如果您从同盾SDK 1.x 版本升级到 3.x,请将 1.x 中的FMUDID_service声明删除 !!!注意!!! -->
    <!-- !!!注意!!! 否则会在某些特殊情况下导致应用崩溃,如果没有该service声明,请忽略此注释 !!!注意!!! -->
</application>

Api

/**
 * 初始化方法
 * @param {Object} options 参数
 * ------- options ---------
 * @param {String} [required] partner 合作方编码
 * @param {String} env sandbox: 测试环境, 生产环境则直接去掉此参数
 * @param {String} allowd 值为: allowd, 生产环境则直接去掉此参数
 */
try {
  await FraudmetrixDeviceFingerPrinting.init({
    partner: 'partner',
    env: 'sandbox',
    allowd: 'allowd',
  });
  console.log(`初始化成功`);
} catch (err) {
  console.log(err);
}

/**
 * 获取 deviceInfo
 * @return {String} deviceInfo
 */
try {
  const deviceInfo = await FraudmetrixDeviceFingerPrinting.getDeviceInfo();
  alert('deviceInfo: ' + deviceInfo + ' -- 获取 deviceInfo成功!!');
} catch (err) {
  alert(`获取 deviceInfo 失败 -- err: ${err.message}`)
}

Contribution

Questions

Feel free to contact me or create an issue

made with ♥