Code Monkey home page Code Monkey logo

houseads's People

Contributors

itznotabug avatar mkaflowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

houseads's Issues

Interstitial does't show

Hello. Thank you for that library. I have a problem with interstitial. It doesn't show and I don't get any messages in logcat. My json:

{
"apps": [
{
"app_title": "App Name (Dialog)",
"app_desc": "Your App's description",
"app_icon": "https://lh3.googleusercontent.com/LNU3wSeIqCtYvvbcklHr4mAQbG4EAVZ_kamQZ_6ECmyYqudAX3FoZy42bIGnSj3pFE5n=s360-rw",
"app_header_image": "https://lh3.googleusercontent.com/jGNuhkp16zXN5njRuUcEEqeoEtxzyoo2V20r6-gPxRBd01kPDPpTqOEPy1gs33uef5w=w2880-h1438-rw",
"app_uri": "https://play.google.com/store/apps/details?id=fm.radio.sanity.radiofm",
"app_rating": "4.5",
"app_cta_text": "Install",
"app_price": "Free",
"app_adType": "dialog"
},
{
"app_title": "App Name (Dialog)",
"app_desc": "Your App's description",
"app_icon": "https://lh3.googleusercontent.com/LNU3wSeIqCtYvvbcklHr4mAQbG4EAVZ_kamQZ_6ECmyYqudAX3FoZy42bIGnSj3pFE5n=s360-rw",
"app_header_image": "https://lh3.googleusercontent.com/jGNuhkp16zXN5njRuUcEEqeoEtxzyoo2V20r6-gPxRBd01kPDPpTqOEPy1gs33uef5w=w2880-h1438-rw",
"app_uri": "https://play.google.com/store/apps/details?id=fm.radio.sanity.radiofm",
"app_rating": "4.5",
"app_cta_text": "Install",
"app_price": "Free",
"app_adType": "interstitial"
}
]
}
final HouseAdsInterstitial interstitial = new HouseAdsInterstitial(MainActivity.this);
        interstitial.setUrl("myURL"); //URL to Json File
        interstitial.loadAd();
        interstitial.setAdListener(new AdListener() {
            @Override
            public void onAdLoadFailed() {
                Log.w("xsa","onAdLoadFailed");

            }

            @Override
            public void onAdLoaded() {
                interstitial.show();
                Log.w("xsa","onAdLoaded");
            }

            @Override
            public void onAdClosed() {

            }

            @Override
            public void onAdShown() {

            }

            @Override
            public void onApplicationLeft() {
                Log.w("xsa","onAdLoadFailed");

            }
        });

Target must not be null. NativeAd

java.lang.IllegalArgumentException: Target must not be null.
at com.squareup.picasso.RequestCreator.into(RequestCreator.java:682)
at com.lazygeniouz.house.ads.HouseAdsNative.setUp(HouseAdsNative.java:174)
at com.lazygeniouz.house.ads.HouseAdsNative.lambda$loadAds$0$HouseAdsNative(HouseAdsNative.java:91)
at com.lazygeniouz.house.ads.-$$Lambda$HouseAdsNative$O9qITdYuNoBmCIlXYjxA9yjAJUE.onPostExecute(lambda)
at com.lazygeniouz.house.ads.helper.JsonPullerTask.onPostExecute(JsonPullerTask.java:28)
at com.lazygeniouz.house.ads.helper.JsonPullerTask.onPostExecute(JsonPullerTask.java:12)
at android.os.AsyncTask.finish(AsyncTask.java:667)
at android.os.AsyncTask.-wrap1(AsyncTask.java)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6198)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)

Error ANRs & Crashes

java.lang.IllegalStateException:
at android.app.Activity.onCreate (Activity.java:1038)
at com.lazygeniouz.ads.HouseAds.HouseAdsInterstitial$InterstitialActivityPotrait.onCreate (HouseAdsInterstitial.java:205)
at android.app.Activity.performCreate (Activity.java:7174)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2910)

Rewarded Ads?

  • Will require an external dependency to a Video Player (most preferably ExoPlayer)
  • Add a CountDown for the reward time limit at the top of Ad, maybe a Splash Image at the end
  • Ad Reward no more than 15 seconds
  • Override backpress & show a dialog stating to complete the Ad, if not already
  • Hit a callback once the Ad is closed on Reward completion

This will be added in a different module, as importing this into the existing base just means adding ExoPlayer
& bloating the library, if someone doesn't use Rewarded Ads.

This is a lot of work, so this will take some time in setting up a dev branch with this.

Dialog doesn' t show

Hello. Thank you for this library ,dialog doesn't show and I don't get any error messages in logcat. i use the same code in exemple :

HouseAdsDialog houseAds = new HouseAdsDialog(RingtonesActivity.this, "https://api.myjson.com/bins/15dehw"); . houseAds.hideIfAppInstalled(false); houseAds.setCardCorners(80); houseAds.setCtaCorner(80); houseAds.setForceLoadFresh(true); houseAds.showHeaderIfAvailable(true); houseAds.loadAds();

my json is :

{ "apps": [ { "app_title": "Kawaii Cats Wallpapers (Dialog)", "app_desc": "Kawaii Cats Wallpapers - Cute wallpapers", "app_icon": "https://funnyjokes.me/kawai/icon_play.png", "app_header_image": "https://funnyjokes.me/kawai/cover.png", "app_uri": "https://play.google.com/store/apps/details?id=com.CuteWallpaper.KawaiiCat", "app_rating": "5", "app_cta_text": "Install", "app_price": "Free", "app_adType": "dialog" }, { "app_interstitial_url": "https://funnyjokes.me/kawai/icon_play.png", "app_uri": "https://play.google.com/store/apps/details?id=com.CuteWallpaper.KawaiiCat", "app_adType": "interstitial" }, { "app_title": "Kawaii Cats Wallpapers (Native Ad)", "app_desc": "Kawaii Cats Wallpapers - Cute wallpapers", "app_icon": "https://funnyjokes.me/kawai/icon_play.png", "app_header_image": "https://funnyjokes.me/kawai/cover.png", "app_uri": "https://play.google.com/store/apps/details?id=com.CuteWallpaper.KawaiiCat", "app_rating": "4.5", "app_cta_text": "Install", "app_price": "Free", "app_adType": "native" } ] }

Use In Maven project

How I can this library in maven project?
Can you add another task in install.gradle that create maven jar.

Crashing on nexus 5

I have installed this app and it always crashing on Nexus 5 and ads are not displaying.

Banner ads

your idea is good but why not banner ads. if possible then also do that. any way cheers for your efforts!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.