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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@empower-nokta/react-native-empower-mobile-ads

v0.4.0

Published

React Native bridge for Empower Mobile Ads SDK

Downloads

32

Readme

@empower-nokta/react-native-mobile-ads

React Native bridge for the Empower Mobile Ads SDK (Android).

Supports banner, interstitial, rewarded, app open, and preroll ad formats.

Requirements

  • React Native 0.70+
  • Android minSdkVersion 21 (Android 5.0)
  • New Architecture: supported via React Native interop layer (0.74+)

Installation

npm install @empower-nokta/react-native-mobile-ads

The package supports auto-linking — no manual linking required for React Native 0.60+.

Android Setup

After installing, you need to configure 4 things in your Android project:

Step 1: Add Maven Repository

In android/build.gradle (project-level), add the Empower Maven repository:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.empower.net/release" }
    }
}

If your project uses dependencyResolutionManagement in settings.gradle instead of allprojects, add the Maven repository there:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url "https://maven.empower.net/release" }
    }
}

Step 2: Resolve Kotlin Version Conflict

The Empower SDK uses Kotlin 2.3.0, which may conflict with React Native's Kotlin version. Add these to your android/build.gradle (project-level):

allprojects {
    configurations.all {
        resolutionStrategy {
            force "org.jetbrains.kotlin:kotlin-stdlib:${rootProject.ext.kotlinVersion}"
            force "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${rootProject.ext.kotlinVersion}"
            force "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${rootProject.ext.kotlinVersion}"
        }
    }
}

And in android/gradle.properties, add:

kotlin.suppressKotlinVersionCompatibilityCheck=2.3.0

Step 3: Add Google Ad Manager Meta-Data

In android/app/src/main/AndroidManifest.xml, inside the <application> tag:

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="YOUR_ADMOB_APP_ID"/>

<meta-data
    android:name="com.google.android.gms.ads.AD_MANAGER_APP"
    android:value="true"/>

Replace YOUR_ADMOB_APP_ID with your Google Ad Manager app ID (e.g., ca-app-pub-XXXXXXXX~XXXXXXXX).

Step 4: Build and Run

cd android && ./gradlew clean && cd ..
npx react-native run-android

Usage

Initialize the SDK

import { init, setDebugMode, setLogLevel } from '@empower-nokta/react-native-mobile-ads';

// Call early in your app (e.g., App.tsx useEffect)
async function initAds() {
  setDebugMode(__DEV__);
  setLogLevel(__DEV__ ? 'all' : 'none');

  await init({
    appAdIdentifier: 'YOUR_APP_IDENTIFIER',
  });
}

Banner Ads

import { EmpowerBannerAd } from '@empower-nokta/react-native-mobile-ads';

function MyScreen() {
  return (
    <EmpowerBannerAd
      zoneId="YOUR_BANNER_ZONE_ID"
      onAdStatusChanged={(e) => console.log('Banner:', e.nativeEvent)}
      style={{ width: '100%', minHeight: 50 }}
    />
  );
}

Interstitial Ads

import {
  loadInterstitialAd,
  showInterstitial,
  addEventListener,
  EmpowerAdsEvents,
} from '@empower-nokta/react-native-mobile-ads';

// Listen for status changes
const unsubscribe = addEventListener(EmpowerAdsEvents.INTERSTITIAL_STATUS, (event) => {
  console.log('Interstitial status:', event.status, event.zoneId);
});

// Preload
await loadInterstitialAd('YOUR_INTERSTITIAL_ZONE_ID');

// Show when ready
await showInterstitial('YOUR_INTERSTITIAL_ZONE_ID');

// Cleanup
unsubscribe();

Rewarded Ads

import {
  loadRewardedAd,
  showRewarded,
  addEventListener,
  EmpowerAdsEvents,
} from '@empower-nokta/react-native-mobile-ads';

const unsubscribe = addEventListener(EmpowerAdsEvents.REWARDED_STATUS, (event) => {
  if (event.status === 'REWARDED') {
    // Grant reward to user
  }
});

await loadRewardedAd('YOUR_REWARDED_ZONE_ID');
await showRewarded('YOUR_REWARDED_ZONE_ID');

unsubscribe();

App Open Ads

import { loadAppOpenAd, showAppOpen } from '@empower-nokta/react-native-mobile-ads';

await loadAppOpenAd('YOUR_APP_OPEN_ZONE_ID');
await showAppOpen('YOUR_APP_OPEN_ZONE_ID');

Settings

import {
  setAdsDisabled,
  setNonPersonalizedAds,
  setDebugMode,
  setLogLevel,
} from '@empower-nokta/react-native-mobile-ads';

setAdsDisabled(false);
setNonPersonalizedAds(true); // GDPR compliance
setDebugMode(true);
setLogLevel('all'); // 'all' | 'default' | 'error' | 'warning' | 'none'

Shutdown

import { shutdown } from '@empower-nokta/react-native-mobile-ads';

shutdown();

API Reference

| Function | Returns | Description | |---|---|---| | init(config) | Promise<boolean> | Initialize the SDK | | isSdkInitialized() | Promise<boolean> | Check if SDK is ready | | setAdsDisabled(bool) | void | Disable/enable all ads | | setNonPersonalizedAds(bool) | void | GDPR non-personalized mode | | setDebugMode(bool) | void | Toggle debug logging | | setLogLevel(level) | void | Set log verbosity | | loadInterstitialAd(zoneId) | Promise<boolean> | Preload interstitial | | showInterstitial(zoneId) | Promise<boolean> | Show interstitial | | loadRewardedAd(zoneId) | Promise<boolean> | Preload rewarded ad | | showRewarded(zoneId) | Promise<boolean> | Show rewarded ad | | loadAppOpenAd(zoneId) | Promise<boolean> | Preload app open ad | | showAppOpen(zoneId) | Promise<boolean> | Show app open ad | | pausePreroll(zoneId) | void | Pause preroll playback | | resumePreroll(zoneId) | void | Resume preroll playback | | destroyPreroll(zoneId) | void | Destroy preroll ad | | shutdown() | void | Shutdown SDK | | addEventListener(event, cb) | () => void | Subscribe to events |

Events

| Event | Payload | |---|---| | EmpowerAds_onSdkReady | {} | | EmpowerAds_onSdkFailed | { error: string } | | EmpowerAds_onBannerStatusChanged | { status, zoneId, adUnitId } | | EmpowerAds_onInterstitialStatusChanged | { status, zoneId } | | EmpowerAds_onRewardedStatusChanged | { status, zoneId } | | EmpowerAds_onAppOpenStatusChanged | { status, zoneId } | | EmpowerAds_onPrerollStatusChanged | { status, zoneId } |

Troubleshooting

"Could not resolve net.empower.mobile.ads:empower-mobile-ads"

You need to add the Empower Maven repository to your project-level android/build.gradle. See Step 1.

"Module compiled with an incompatible version of Kotlin"

Add the Kotlin version resolution strategy and suppressKotlinVersionCompatibilityCheck property. See Step 2.

TurboModuleRegistry.getEnforcing crash

This usually means Metro is serving a JS bundle from a different project. Make sure Metro is running from your project root:

npx react-native start --reset-cache

The module is compatible with New Architecture via React Native's interop layer (RN 0.74+).

Banner ad loads but is not visible

Ensure the EmpowerBannerAd component has explicit dimensions:

<EmpowerBannerAd
  zoneId="YOUR_ZONE_ID"
  style={{ width: '100%', minHeight: 50 }}
/>

"No fill" from Google Ad Manager

This means no ad is available for your ad unit. Check that your applicationId in build.gradle matches the package name configured in your Google Ad Manager account.

SDK initializes but init() Promise never resolves

The init() Promise resolves when the SDK is fully ready (including Google Mobile Ads initialization). This can take a few seconds. If it never resolves, check logcat for errors:

adb logcat | grep EmpowerAds

Notes

  • Android only: iOS support is not included in this bridge.
  • Preroll Ads: Preroll ads require a native PlayerView and are not yet bridged as a React component. Use pausePreroll/resumePreroll/destroyPreroll for lifecycle management.
  • Min SDK: Android API 21+ (Android 5.0)

License

MIT