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-appodeal-enhanced

v1.0.4

Published

React Native Module created to support Appodeal SDK for iOS and Android platforms

Downloads

6

Readme

react-native-appodeal

React Native package that adds Appodeal SDK support to your react-native application.

Getting started

$ npm install react-native-appodeal --save

Mostly automatic installation

$ react-native link react-native-appodeal

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-appodeal and add RNAppodeal.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNAppodeal.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import com.reactlibrary.RNAppodealPackage; to the imports at the top of the file
  • Add new RNAppodealPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-appodeal'
    project(':react-native-appodeal').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-appodeal/android')
  2. Insert following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-appodeal')

After install Configuration

iOS Configuration

  • Download Appodeal SDK and unzip it somewhere.
  • Drag'n'drop it to the opened XCode project and select copy if needed or add it manually.
  • Go to 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.
  • Set up the following keys in your app’s info.plist:
<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>

Android

  • Insert following repository (to use AdColony ad network with Appodeal) inside repositories block in android/app/build.gradle:
maven {
   url  "https://adcolony.bintray.com/AdColony"      
}
  • Add Google Play Services Ads and Location into your gradle dependencies of 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"
  • Enable multiDex in your application. Follow this documentation to enable it.

Usage

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"));

Changelog

2.1.4

  • release