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

cordova-appodeal-prime

v1.0.1

Published

Cordova Appodeal Prime

Downloads

4

Readme

Cordova Plugin Appodeal Prime

Warning the iOS podfiles of Appodeal has the size of 1.2GB please use a decent internet connection to install this plugin

Installation

cordova plugin add cordova-appodeal-prime --variable ANDROID_APP_KEY=xxxx-your-android-api-key-xxxx --variable IOS_APP_KEY=xxxx-your-ios-api-key-xxxx

Prerequisite(iOS)

This Plugin uses cordova-plugin-cocoapod-support to generate the Podfile to match the min ios version in pod file. You must check at yourprojectDir/config.xml before using this plugin.

add this

<platform name="ios">
    ...
    <preference name="pods_ios_min_version" value="11.0"/>
    ...
</platform>

Prerequisite(Android)

Minimum Android SdkVersion=21

The Appodeal SDK requires the com.android.support:recyclerview-v7 suppoort library. Before the installation please check the version of your project com.android.support libraries version and add another --variable to the cordova plugin add

The default uses 27+

cordova plugin add cordova-plugin-fbanfree --variable ANDROID_SUPPORT_RECYCLERVIEW_VERSION=20+ --variable ANDROID_APP_KEY=xxxx --variable IOS_APP_KEY=xxxx

And just like the iOS Version the Android version needs the config.xml modification as well. The plugin uses cordova-custom-config to add the http://schemas.android.com/tools to the Manifest file, to do that you will need to add the following line to your app config.xml.

<platform name="android">
    ...
    <custom-preference name="android-manifest/@xmlns:tools" value="http://schemas.android.com/tools" />
    ...
</platform>

Usage

// initialize the Appodeal prime after the cordova device ready (do not use the ready function in the document.ready.
// because the app initialization time will disgustingly increase).
onDeviceReady: function() {
    this.receivedEvent('deviceready');
    ...
    appodealprime.ready();
}


// show banner
appodealprime.showBanner()
then(res => {
    console.log('Banner shown');
})
.catch(err => {
    console.log('Error showing banner');
});

// show native ad (Can only add top position modification and can only show 1 native ad right now).

// the load native ad can be at anywhere in the app but should be in the same page as the show native.
// if the ads got loaded too much without showing the Appodeal ad bidding will decrease the ad loading for your app.
appodealprime.loadNative()
then(res => {
    console.log('Native loaded');
})
.catch(err => {
    console.log('error loading native ad');
});

const data = {
    position: {
        top: 220
    }
}
appodealprime.showNative(data)
then(res => {
    console.log('Native shown');
})
.catch(err => {
    console.log('error showing native');
});

// show Interstitial (No need to load the interstitial because 
// the Appodeal will do all the loading in ready() function).
appodealprime.showInterstitial('YOUR_PLACEMENT_ID')
.then(res => {
   console.log('interstitial show success:');
})
.catch(err => {
   console.log('error showing interstitial:');
});

// show Rewarded video ad.
appodealprime.showRewardedVideo('YOUR_PLACEMENT_ID')
.then(res => {
   console.log('rewarded video show success:');
})
.catch(err => {
   console.log('error showing rewarded video:');
});

// To get the Ad Event Listener you must implement the document.addEventListener('event name', () =>{}) like this

document.addEventListener('appodeal.interstitial.close', () => {
  console.log('interstitial close listener');
  // your code here
});

// here is the list of events for appodeal ads
"appodeal.banner.click"
"appodeal.banner.load_fail"
"appodeal.banner.load"
"appodeal.banner.show"
"appodeal.interstitial.click"
"appodeal.interstitial.show"
"appodeal.interstitial.close"
"appodeal.interstitial.show_fail"
"appodeal.interstitial.load"
"appodeal.interstitial.load_fail"
"appodeal.interstitial.will_close"
"appodeal.reward_video.click"
"appodeal.reward_video.complete"
"appodeal.reward_video.show_fail"
"appodeal.reward_video.show"
"appodeal.reward_video.load"
"appodeal.reward_video.close"
"appodeal.reward_video.load_fail"
"appodeal.native.click"
"appodeal.native.show"
"appodeal.native.load_fail"
"appodeal.native.load"