background

For a long time, we have directly used the official demo for native manual integration, but umeng official has not been updated for a long time, the SDK is older, and many methods are missing, such as the sharing of small programs, so I packaged umeng statistics, sharing and authorization by myself, and provided it in the form of NPM package. Without the complicated steps of manual integration (although there are still a lot of changes to be made native due to the number of third-party platforms involved in sharing, the library is clearly documented)

function

Compare that to the official demo

  • NPM package
  • Completely typescript,
  • Full promise-making (the official demo is callback)
  • All sharing modes are supported(Except emoji sharing)
  • Supports custom parameter transfer in the share panel
  • Compatible with the latest UMeng SDK

Api

AnalyticsUtil

The name of the describe
Manual page statistics interface onPageStart (pageName: string)
Manual page statistics interface onPageEnd (pageName: string)
Custom events onEvent (eventId: string)
Custom events onEventWithLable (eventId: string, eventLabel: string)
Custom events onEventWithMap (eventId: string, eventData: {[key:string]: string})
Custom events onEventWithMapAndCount (eventId: string, eventData: {[key:string]: string}, eventNum:number)
Custom events onEventObject (eventId: string, eventData: {[key:string]: any})
Registers preset event properties registerPreProperties (property: {[key:string]: any})
Unregister the preset event properties unregisterPreProperty (propertyName: string)
Gets preset event properties getPreProperties (callback: (result: string)=>void)
Clears all preset event properties clearPreProperties ()
Setting concerns whether the event is triggered for the first time setFirstLaunchEvent (eventList: Array)
Account statistics profileSignInWithPUID (puid: string)
Account statistics profileSignInWithPUIDWithProvider (provider: string, puid: string)
Account to log out profileSignOff ()

ShareUtil

Compared to AnalyticsUtil,ShareUtil is basically completely modified to invoke different shares depending on the parameters passed

The name of the describe
share share (shareStyle: SHARE_STYLES, shareObject: BaseMediaObject)
authorization auth (shareMedia: SHARE_MEDIAS)

Supported sharing methods:

The name of the describe
LINK Webpage Link (Webpage H5 link)
WEIXIN_MINI_PROGRAM Wechat applets
QQ_MINI_PROGRAM QQ small programs
IMAGE A single figure
TEXT Plain text
MULITI_IMAGE Polygraph (polygraph should include text description)
VIDEO video
MUSIC music
Emotion (GIF, Emotion, only supported by wechat) (not yet implemented)

Supported sharing platforms:

QQ, SINA, WEIXIN, WEIXIN_CIRCLE, QZONE… Check out u-Share for details

detailed

Specific usage, directly view, if useful, trouble star

Github.com/yz1311/rn-u…

other

Bugly has been fully updated for Android

High-performance Wheel Picker selection component (date, time segment, province and city linkage)

RN shadow effect

RN handwritten signature

RN Autonavi navigation library

RN implements clearing the local cache

RN implements custom code-push hot updates

RN’s code-push-server management App

RN blog park App