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

react-native-getui-master-tony

v1.1.28

Published

Getui push sdk plugin for rect-native

Downloads

41

Readme

Build Setup for Andorid

1、android/settings.gradle

include ':react-native-getui'
project(':react-native-getui').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-getui/android')

2、android/app/proguard-rules.pro

-dontwarn com.igexin.**
-keep class com.igexin.**{*;}
-keep class org.json.** { *; }

-keep class android.support.v4.app.NotificationCompat { *; }
-keep class android.support.v4.app.NotificationCompat$Builder { *; }

3、android/app/build.gradle中的defaultConfig

ndk {
    abiFilters "armeabi", "armeabi-v7a", "x86_64"
}
manifestPlaceholders = [
    GETUI_APP_ID : "",
    GETUI_APP_KEY : "",
    GETUI_APP_SECRET : ""
]

4、android/app/build.gradle中的dependencies

compile project(':react-native-getui')

5、android/app/src/main/AndroidManifest.xml

    <!-- 个推SDK权限配置开始 -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.GET_TASKS" />
    <!-- 支持iBeancon 需要蓝牙权限 -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <!-- 支持个推3.0 电子围栏功能 -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!-- 浮动通知权限 -->
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <!-- 自定义权限 -->
    <uses-permission android:name="getui.permission.GetuiService.${applicationId}" />
    <permission
        android:name="getui.permission.GetuiService.${applicationId}"
        android:protectionLevel="normal" >
    </permission>
    <!-- 个推SDK权限配置结束 -->

    // 以下内容加在application节点下
    <!-- 个推SDK配置开始 -->
        <!-- 配置的第三方参数属性 -->
        <meta-data
            android:name="PUSH_APPID"
            android:value="${GETUI_APP_ID}" />
        <meta-data
            android:name="PUSH_APPKEY"
            android:value="${GETUI_APP_KEY}" />
        <meta-data
            android:name="PUSH_APPSECRET"
            android:value="${GETUI_APP_SECRET}" />

        <!-- 配置SDK核心服务 -->
        <service
            android:name="com.igexin.sdk.PushService"
            android:exported="true"
            android:label="NotificationCenter"
            android:process=":pushservice">
            <intent-filter>
                <action android:name="com.igexin.sdk.action.service.message"/>
            </intent-filter>
        </service>

        <receiver android:name="com.igexin.sdk.PushReceiver" >
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
                <action android:name="android.intent.action.USER_PRESENT" />
                <action android:name="com.igexin.sdk.action.refreshls" />
                <!-- 以下三项为可选的action声明,可大大提高service存活率和消息到达速度 -->
                <action android:name="android.intent.action.MEDIA_MOUNTED" />
                <action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
                <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
            </intent-filter>
        </receiver>

        <activity
            android:name="com.igexin.sdk.PushActivity"
            android:excludeFromRecents="true"
            android:exported="false"
            android:process=":pushservice"
            android:taskAffinity="com.igexin.sdk.PushActivityTask"
            android:theme="@android:style/Theme.Translucent.NoTitleBar" >
        </activity>

        <activity
        android:name="com.igexin.sdk.GActivity"
        android:excludeFromRecents="true"
        android:exported="true"
        android:process=":pushservice"
        android:taskAffinity="com.igexin.sdk.PushActivityTask"
        android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

        <!-- 个推SDK配置结束 -->

        <service
            android:name="com.getui.reactnativegetui.PushService"
            android:exported="true"
            android:label="PushService"
            android:process=":pushservice"/>

        <service android:name="com.getui.reactnativegetui.PushIntentService"/>

        // 在application标签中添加
        <application android:usesCleartextTraffic="true">

6、将react-native-getui/example/pushDemoWithFramework/android/app/src/main/jniLibs目录复制到你的项目android相同目录下。

7、在android/app/src/main/java/com/你的项目/MainActivity.java中添加以下代码

import com.getui.reactnativegetui.GetuiModule;

protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    GetuiModule.initPush(this);
}

8、在android/app/src/main/java/com/你的项目/MainApplication.java中添加以下代码

import com.getui.reactnativegetui.GetuiPackage;

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new GetuiPackage()
    );
}

9、将react-native-getui/example/pushDemoWithFramework/android/app/src/main/res/layout目录复制到你的android相同目录下。