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

rn-umeng

v1.0.6

Published

RN-Umeng

Downloads

19

Readme

React Native Umeng

A Umeng lib for React Native

iOS Install

$ npm install --save rn-umeng
$ rnpm link rn-umeng

Android Install (Manual)

$ npm install --save rn-umeng

Add Gradle Module Manually

Module Source:

$PROJECT_DIR/node_modules/rn-umeng/android

image

image

Add UmengPackage

ReactInstanceManager.builder() ...
.addPackage(new UmengPackage())

onResume and onPause

@Override
protected void onResume() {
	super.onResume();
	MobclickAgent.onResume(this);
}

@Override
protected void onPause() {
	super.onPause();
	MobclickAgent.onPause(this);
}

Usage

The api mapping below

React Native Side | iOS Side | Android Side
--------------------------|---------------------|----------------------- startWithAppkey(string) | startWithAppkey(NSString) | AnalyticsConfig.setAppkey(String appkey) startWithAppkeyAndChannel(string,string) | N/A | UMAnalyticsConfig(Context context, String appkey, String channelId)
setAppVersion(string) | setAppVersion(string) | Not need to set it setDebugMode(bool) | setLogEnabled(BOOL) | MobclickAgent.setDebugMode( true )
enableEncrypt(boole) | setEncryptEnabled(BOOL) | AnalyticsConfig.enableEncrypt(boolean enable)
setCrashReportEnabled(boole) | setCrashReportEnabled(BOOL) | MobclickAgent.setCatchUncaughtExceptions(false) onEvent(string) |event:(NSString *)eventId | MobclickAgent.onEvent(Context context, String eventId) onEvent(string,{key:"value"}) | onEvent:(NSString *)eventId attributes:(NSDictionary *)attributes | MobclickAgent.onEvent(Context context, String eventId, HashMap map) onEvent(string,{key:"value"},0) | onEvent:(NSString *)eventId attributes:(NSDictionary *)attributes counter:(NSString *)counter | MobclickAgent.onEventValue(Context context, String id, Map<String,String> m, int du) onProfileSignIn('ID') | profileSignInWithPUID:(NSString *)puid | onProfileSignIn(String ID) onProfileSignIn('ID','Provider') | profileSignInWithPUID:(NSString *)puid provider:(NSString *)provider | onProfileSignIn(String Provider, String ID) onProfileSignOff() | profileSignOff | onProfileSignOff() onPageStart(string) | beginLogPageView:(NSString *)pageName | MobclickAgent.onPageStart(String pageName) onPageEnd(string) | endLogPageView:(NSString *)pageName | MobclickAgent.onPageEnd(String pageName) onLogPageViewInseconds('pageName',10) | logPageView:pageName seconds:seconds | N/A openActivityDurationTrack(boole) | N/A | MobclickAgent.openActivityDurationTrack(boolean value) onResume() | N/A | MobclickAgent.onResume() onPause() | N/A | MobclickAgent.onPause() getDeviceInfo((infoStr)=>{}) | getDeviceInfo | getDeviceInfo

In your project code

import MobclickAgent from 'rn-umeng';
MobclickAgent.startWithAppkey('your appkey');
MobclickAgent.setDebugMode(true);
MobclickAgent.onEvent("testEvent");

Changelog

- 1.0.6

  • support RN 0.40

- 1.0.5

  • fix error in LazyReactPackage

- 1.0.4

  • add Android channel set

- 1.0.3

  • add Android lib (but Manually,rnpm link not works,fix later)
  • update readme.md

- 1.0.2

  • Project initialization

License

MIT