revmob for android not working

– For more information on build.settings see the Corona SDK Build Guide at:

http://docs.coronalabs.com/guide/distribution/buildSettings/index.html

settings =

{

plugins=

{

[“plugin.revmob”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

        

          [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”,

             --supportedPlatforms = { android=true, iphone=true },

        },

        

},

orientation =

{

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

default = “portrait”,

supported = { “portrait”, }

},

excludeFiles =

{

– Include only the necessary icon files on each platform

all = { “*.ai” },

iphone = { “Icon-*dpi.png” },

android = { “Icon.png”, “Icon-Small-*.png”, “Icon*@2x.png” },

},

– iOS Section

iphone =

{

plist =

{

NSAppTransportSecurity = { NSAllowsArbitraryLoads=true },

UIStatusBarHidden = false,

UIPrerenderedIcon = true, – set to false for “shine” overlay

–UIApplicationExitsOnSuspend = true, – uncomment to quit app on suspend

CFBundleIconFiles =

{

“Icon.png”,

“Icon@2x.png”,

“Icon-60.png”,

“Icon-60@2x.png”,

“Icon-60@3x.png”,

“Icon-72.png”,

“Icon-72@2x.png”,

“Icon-76.png”,

“Icon-76@2x.png”,

“Icon-Small.png”,

“Icon-Small@2x.png”,

“Icon-Small@3x.png”,

“Icon-Small-40.png”,

“Icon-Small-40@2x.png”,

“Icon-Small-50.png”,

“Icon-Small-50@2x.png”,

},

–[[

– iOS app URL schemes:

CFBundleURLTypes =

{

{

CFBundleURLSchemes =

{

“fbXXXXXXXXX”,  – replace XXXXXXXXX with your Facebook appId

}

}

}

–]]

}

},

– Android Section

android =

{

usesPermissions =

{

“android.permission.INTERNET”,

},

},

}

local revmob = require( “plugin.revmob” )

–banner,popupinicial,popupsalida,gameoverint,continuarvideo

local placementID={“570a54cdb492cf065b514efa”,“570bf09d46da18e4655e315d”,“570c272ce32c76620b0ec273”,“570c27495e696354498990de”,“570c27b2e32c76620b0ec275”}

local tipo={“banner”,“interstitial”,“interstitial”,“video”,“rewardedVideo”}

local function adListener( event )

    if ( event.phase == “init” ) then  – Successful initialization

        print( event.isError )

        

         elseif ( event.phase == “loaded” ) then  – The ad was successfully loaded

        print( event.type )

    elseif ( event.phase == “failed” ) then  – The ad failed to load

        print( event.type )

        print( event.isError )

        print( event.response )

     

    end

end

– Initialize RevMob

revmob.init( adListener, { appId=“570a54ccb492cf065b514ef8” } )

revmob.show( placementID[1], { yAlign=“bottom” } )

nothing happends

What device are you testing this on, and what version of Android does your device run? (e.g 4.1, 5.1 etc)

Thank you. It solved my issue

5.1 android sony xperia c5 ultra

From your code sample, I don’t see where you are calling revmob.load?

The flow goes like this

init()

load()

show() - When the ad has loaded

local function adListener( event )

    if ( event.phase == “init” ) then  – Successful initialization

        print( event.isError )

        revmob.load( placementID[1], { yAlign=“bottom” } )

         elseif ( event.phase == “loaded” ) then  – The ad was successfully loaded

        print( event.type )

       

        revmob.show( PL, { yAlign=“bottom” } )

    elseif ( event.phase == “failed” ) then  – The ad failed to load

        print( event.type )

        print( event.isError )

        print( event.response )

        

         local alert = native.showAlert( “Error Ads”,tostring(event.response) , { “OK”})

     

     

    end

end

nothing either,

I suggest that you take a few steps back and re-read the documentation. It’s important to read through each step, to ensure you’re calling the apis correctly.

You should be getting messages printed in the Android debug console (adb logcat, Android monitor or your tool of choice). There is a nice guide on the blog about getting set up with that, if you haven’t already done so.

The call you are making to the load() method is incorrect (missing params, including ones that don’t belong in that function call)

I tried everything and nothing happends you have some code example to compare i want to show banner, insterstitial, video and rewarded videos, and when no fill rate show ads from another network like admob or chartboost

Hi @Rene.castillo,

We’ll be assembling a sample for this plugin, probably within a week or so. In the meantime, are you 100% sure that your placement IDs set up with RevMob are correctly configured?

Brent

Yes, sure

Here castillo I created a sample for you. The keys are mine but you should be able to build it and run it first then switch the keys and see what happens. This works on my Sony Z1 Compact running 5.1.

Here is a sample you can try also: https://dl.dropboxusercontent.com/u/28484098/RevMobSample.zip

Thought I already posted this. Sorry

This didn’t work for me on a device running 4.0.4.   Ads are not loading.

Is 4.1 also required for banner and fullscreen ads?  I know video not supported but I’m not using it.

I can see what device I have around that is older than 4.1 and test it. I’ll get back to you today.

I can confirm that it doesn’t work on 4.0.3. I tried many permutations and I can’t get it to work. It works fine on 5.1

This is what i tried in case other people also want to continue testing it:

  1. In the console I noticed an error about multidex from the app when running 4.0.3. So I added minsdkversion of 14 to try to make sure that it didn’t use multidex. This did not work.

  2. I also tried version 2851 of Corona from this year. I believe 2853 was the one that introduced multidex. This did nothing to fix the issue although the multidex error was gone.

  3. The only other error is related to not being able to connect to Google services. I tried to build it for Amazon since technically RevMob should support Amazon store and that store does not support Google services. The app at least for me won’t run when I target Amazon, it states it can’t find RevMob files.

  4. Removing Google Services from the app will cause it to crash on startup.

Thanks for the research.   How do you force an upgrade of a device?  My only functioning device is this cheap Sony tablet and it claims it’s up to date with 4.0.4.

In the meantime I’m going to go back to the old RevMob API I last used a couple years ago and see if it still works.

As for the upgrade, I don’t know of an easy way. I have a bunch of older phones but still newer than 4.0.3 sitting around (friends and family give them to me when they upgrade). If you want I can probably send you one.

The old lua based RevMob API still works for me.

Hey Agramonte. As for #3+4, Google play services are required for Revmob to work.

EDIT: Can I also see your build.settings file please?

I’ll do some more testing on my end and see if I can reproduce these issues on a 4.x device.

Thank you