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-admobile

v1.1.4

Published

react-native-admobile

Downloads

159

Readme

react-native-admobile

Getting started


$ npm install react-native-admobile --save
或
$ yarn add react-native-admobile

文档

Android 配置

Android:
设置oaid 
将Demo中assets文件夹下的supplierconfig.json文件复制到自己的assets目录下并按照supplierconfig.json文件中的说明进行OAID的 AppId 配置,supplierconfig.json文件名不可修改。需要设置 appid 的部分需要去对应厂商的应用商店的应用信息中查看。;

添加以下混淆配置:
-keep class com.bun.miitmdid.core.** {*;}
-keep class XI.CA.XI.**{*;}
-keep class XI.K0.XI.**{*;}
-keep class XI.XI.K0.**{*;}
-keep class XI.vs.K0.**{*;}
-keep class XI.xo.XI.XI.**{*;}
-keep class com.asus.msa.SupplementaryDID.**{*;}
-keep class com.asus.msa.sdid.**{*;}
-keep class com.bun.lib.**{*;}
-keep class com.bun.miitmdid.**{*;}
-keep class com.huawei.hms.ads.identifier.**{*;}
-keep class com.samsung.android.deviceidservice.**{*;}
-keep class com.zui.opendeviceidlibrary.**{*;}
-keep class org.json.**{*;}
-keep public class com.netease.nis.sdkwrapper.Utils {public <methods>;}

修改AndroidManifest.xml,OAID SDK minSdkVersion为21,如果应用的minSdkVersion小于21,则添加:
// 如果导入后有冲突可以不添加,suyi中已经添加过了
<uses-sdk tools:overrideLibrary="com.bun.miitmdid"/>
allprojects {
    repositories {
        ...
        google()
        jcenter()
        mavenCentral()
        // 添加ADSuyi相关仓库依赖
        maven { url "https://maven.admobile.top/repository/maven-releases/" }
        // 如果添加了汇量广告,需要添加汇量的远程仓库依赖
        maven { url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" }
        // 如果添加了华为联盟广告,需要添加华为联盟的远程仓库依赖
        maven { url 'https://developer.huawei.com/repo/' }
        // 如果添加了gromore广告,需要添加gromore的远程仓库依赖
        maven { url "https://artifact.bytedance.com/repository/pangle" }
    }
}

注意事项

支持主流架构,x86架构暂不支持

ndk {
	// 设置支持的SO库架构,暂不支持x86
	abiFilters 'armeabi-v7a', 'arm64-v8a'
}
 权限:
<!-- 广告必须的权限,允许网络访问 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- 广告必须的权限,允许安装未知来源权限(如下载类广告下载完成后唤起安卓) -->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<!-- 广告必须的权限,地理位置权限,获取位置信息,用于广告投放。精准广告投放及反作弊 -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- 如果有视频相关的广告播放请务必添加,屏幕保持唤醒不锁屏(部分渠道未添加该权限时会出现视频类广告黑屏)-->
<uses-permission android:name="android.permission.WAKE_LOCK" />

<!-- 如果接入了广点通渠道,必须加入以下权限,不然会导致广点通填充失败 -->
<!-- 允许应用获取 MAC 地址。广告投放及广告监测归因、反作弊 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- 允许应用检测网络状态,SDK 会根据网络状态选择是否发送数据 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- 影响广告填充,强烈建议的权限,获取设备信息,允许应用获取手机状态(包括手机号码、IMEI、IMSI权限等)。广告投放及广告监测归因、反作弊 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<!-- 为了提高广告收益,建议设置的权限,写入权限,用于下载类广告数据写入 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- 为了提高广告收益,建议设置的权限,读取权限,用于下载类广告数据读取(如判断是否已下载过该APK,避免重复下载)-->
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<!-- 为了提高广告收益,建议设置的权限,获取粗略位置信息。精准广告投放及反作弊 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

Mostly automatic installation

$ react-native link react-native-admobile

Usage

import ReactNativeAdmobile from 'react-native-admobile';

// TODO: What to do with the module?
ReactNativeAdmobile;