
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
react-native-appodeal-enhanced
Advanced tools
React Native Module created to support Appodeal SDK for iOS and Android platforms
React Native package that adds Appodeal SDK support to your react-native application.
$ npm install react-native-appodeal --save
$ react-native link react-native-appodeal
Libraries âžś Add Files to [your project's name]node_modules âžś react-native-appodeal and add RNAppodeal.xcodeprojlibRNAppodeal.a to your project's Build Phases âžś Link Binary With LibrariesCmd+R)<android/app/src/main/java/[...]/MainApplication.javaimport com.reactlibrary.RNAppodealPackage; to the imports at the top of the filenew RNAppodealPackage() to the list returned by the getPackages() methodandroid/settings.gradle:
include ':react-native-appodeal'
project(':react-native-appodeal').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-appodeal/android')
android/app/build.gradle:
  compile project(':react-native-appodeal')
Build Phases, expand Link Binnary With Libraries and add there following frameworks and libraries:
AdSupport, AudioToolbox, AVFoundation, CFNetwork, CoreGraphics, CoreImage, CoreLocation, CoreMedia, CoreMotion, CoreTelephony, EventKitUI, GLKit, ImageIO, JavaScriptCore, libc++, libsqlite3.dylib, libxml2.2.dylib, libz.dylib, MediaPlayer, MessageUI, MobileCoreServices, QuartzCore, Security, StoreKit, SystemConfiguration, Twitter, UIKit, WebKit.<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
android/app/build.gradle:maven {
   url  "https://adcolony.bintray.com/AdColony"      
}
android/app/build.gradle:compile "com.google.android.gms:play-services-ads:9.8.0"
compile "com.google.android.gms:play-services-location:9.8.0"
import { Appodeal } from 'react-native-appodeal';
/*
Available Ad Types:
Appodeal.NONE = 0;
Appodeal.INTERSTITIAL = 3;
Appodeal.BANNER = 4;
Appodeal.BANNER_BOTTOM = 8;
Appodeal.BANNER_TOP = 16;
Appodeal.REWARDED_VIDEO = 128;
Appodeal.NON_SKIPPABLE_VIDEO = 256;
*/
//additional configuration that should be used before initialization:
//set ad auto caching enabled/disabled:
Appodeal.setAutoCache(adtypes, bool);
//enable/disable tablet banners support:
Appodeal.setTabletBanners(bool);
//enable/disable smart banners support:
Appodeal.setSmartBanners(bool);
//enable/disable banner refresh animation:
Appodeal.setBannerAnimation(bool);
//enable/disable banner background:
Appodeal.setBannerBackground(bool);
//set testing mode enabled/disabled
Appodeal.setTesting(bool);
/*enabled/disable additional logging from sdk for debugging:
available constants: LogLevel.none | LogLevel.debug | LogLevel.verbose */
Appodeal.setLogLevel(LogLevel.verbose);
//enable/disable child direct threatment:
Appodeal.setChildDirectedTreatment(bool);
//enable/disable triggering show for precache ads:
Appodeal.setOnLoadedTriggerBoth(bool);
//disable network:
Appodeal.disableNetwork(networkName);
//disable network for ad type:
Appodeal.disableNetwork(network, adTypes);
//disable location tracking:
Appodeal.disableLocationPermissionCheck();
//disable write external permission warning on app start if its missing:
Appodeal.disableWriteExternalStoragePermissionCheck();
//request Android M permissions on app start:
Appodeal.requestAndroidMPermissions();
//mute calls if calls muted on Android:
Appodeal.muteVideosIfCallsMuted(bool);
//Initialize Appodeal SDK:
Appodeal.initialize("your-appodeal-application-key", adtypes);
//Display Ads, can return bool if ads was shown or not in a callback parameter:
Appodeal.show(adtypes, "placement_name", (result) => console.log(result));
//or
Appodeal.show(adtypes, "placement_name");
//Caching ad an if autocache was disabled before initialization:
Appodeal.cache(adtypes);
//Hiding banner ads:
Appodeal.hide(Appodeal.BANNER);
//Check if an ad was loaded:
Appodeal.isLoaded(adtypes, (isLoaded) => console.log(isLoaded));
//Check if loaded ad is precache or not:
Appodeal.isPrecache(adtypes, (isPrecache) => console.log(isPrecache));
//Check if ad can be shown for specified placement or default placement:
Appodeal.canShow(adtypes, (canShow) => console.log(canShow));
//Show test Screen for testing network integrations:
Appodeal.showTestScreen();
//Ad Events available with Appodeal React Native Module:
//Interstitial callbacks
Appodeal.addEventListener('onInterstitialLoaded', (event) => console.log("Interstitial loaded. Precache: ", event.isPrecache));
Appodeal.addEventListener('onInterstitialClicked', () => console.log("Interstitial clicked"));
Appodeal.addEventListener('onInterstitialClosed', () => console.log("Interstitial closed"));
Appodeal.addEventListener('onInterstitialFailedToLoad', () => console.log("Interstitial failed to load"));
Appodeal.addEventListener('onInterstitialShown', () => console.log("Interstitial shown"));
//Banner callbacks
Appodeal.addEventListener('onBannerClicked', () => console.log("Banner clicked"));
Appodeal.addEventListener('onBannerFailedToLoad', () => console.log("Banner failed to load"));
Appodeal.addEventListener('onBannerLoaded', (event) => console.log("Banner loaded. Height: ", event.height + ", precache: " + event.isPrecache));
Appodeal.addEventListener('onBannerShown', () => console.log("Banner shown"));
//Rewarded video callbacks
Appodeal.addEventListener('onRewardedVideoClosed', (event) => console.log("Rewarded video closed: ", event.isFinished));
Appodeal.addEventListener('onRewardedVideoFailedToLoad', () => console.log("Rewarded video failed to load"));
Appodeal.addEventListener('onRewardedVideoFinished', (event) => console.log("Rewarded video finished. Amount: ", event.amount + ", currency" + event.currency));
Appodeal.addEventListener('onRewardedVideoLoaded', () => console.log("Rewarded video loaded"));
Appodeal.addEventListener('onRewardedVideoShown', () => console.log("Rewarded video shown"));
//Rewarded video callbacks
Appodeal.addEventListener('onNonSkippableVideoClosed', (event) => console.log("Non Skippable video closed: ", event.isFinished));
Appodeal.addEventListener('onNonSkippableVideoFailedToLoad', () => console.log("Non Skippable video failed to load"));
Appodeal.addEventListener('onNonSkippableVideoFinished', () => console.log("Non Skippable video finished"));
Appodeal.addEventListener('onNonSkippableVideoLoaded', () => console.log("Non Skippable video loaded"));
Appodeal.addEventListener('onNonSkippableVideoShown', () => console.log("Non Skippable video shown"));
2.1.4
FAQs
React Native Module created to support Appodeal SDK for iOS and Android platforms
We found that react-native-appodeal-enhanced demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.