APPNEXT IS DICONTINUED DO NOT USE! Revmob docs outdated. Anything else broken?

Appnext will stop showing Ads on May 25th. Not broken but a massive waste of time if you have not released your app.

Quote from Appnext support:

We have sent a notice regarding the Corona plugin days ago, which will be discontinued and will stop working on the 25th of May. You may consider integrating our SDK. you’ll find more info on ourDevelopers page

@russm305 -  How is it broken?  Please provide specific details and supporting information to go with this assertion.

Are You saying there is an SDK bug and Revmob hasn’t fixed it?  If so, that is annoying.

@RG Using the current revmob documentation.  I was able to succesfully load  banner and video ads with several old builds 2016.2970, 2016.3022, 2016.3033.  At  builds 2016.3049 through 2017.3184 it will “Init” after calling revmob.init, but “event.phase == “sessionStarted”” never is called. (Which happens automatically in older builds)   My check was to print the  event.phase from the “Init” callback function to the screen after I built .apk and upload through dropbox.  Their is no “sessionStarted” on later builds.

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

      local text=display.newText(“init =”…event.phase, 80, 150, “arial”, 45)

 end

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

        local text=display.newText("SS =  "…event.phase, 280, 200, “arial”, 45)

end

[/lua]

Question - how do I check the Android through the Command Line to see all the Android errors?

@Agramonrte  THANK YOU,   I just completed integrating Appnext  LOL!

Console debugging of android is done with ADB:

https://docs.coronalabs.com/guide/basics/debugging/index.html#device-debugging-android

So… the ‘sessionStarted’ event phase is missing?  This is annoying, but not blocking.  The ads still serve, Yes?

I wouldn’t stop using Revmob just because that event phase is missing.  You can get by without it.

Sorry for confusion explaining. 

ADS DO NOT SERVE AT ALL  since “sessionStarted” isnt being called by Revmob and it is blocking.  When you call revmob.load() event.phase will return “failed” instead of “loaded”, as is does in older builds.  The reason is when you call “init” automatically it moves to “sessionStarted”.  Without “sessionStarted”  it does not work.

** UPDATE **   I see, so no matter when you call load(), show(), etc they fail.

Bummer.

  1. You keep saying ‘sessionStarted’ isn’t being called.   You don’t call events.  It is an event and you’re not receiving it.

  2. Even if you call init(), wait 5 seconds (probably longer than needed) then call show() you don’t get an ad?

Note: I have no investment in this.  I’m just trying to understand if you can or cannot call show() at some time after init() and get an ad.

I used this within the last couple of month without issue so I’m surprised.

Thanks,

Ed

It also seems I’m losing track of time.  The last time I used Revmob was actually late last year.  …sigh.  Time speeds up as you get older, or it feels like it.

  1. Even if you call init(), wait 5 seconds (probably longer than needed) then call show() you don’t get an ad?

That is correct.

Okay i see you edited above.  You must have gave it a try.  Last build that will work is 2016.3033. 

Can you get the latest daily build and try that?

If your using older daily builds, then you’re using an older plugin. 

Rob

Yes used latest daily build 2017.3184.  I can confirm it does not work.  I believe RoamingGamer just gave it a try also with latest build.  I have concluded it has broke between build 2017.3033 (loads ads)  and 2017.3049 (does not load ads).

The latest daily build is 2018.3293.

https://developer.coronalabs.com/downloads/daily-builds/

Please try with the latest daily build. Also please do some form of table print on the event table in your listener function, run on a real device and capture the result with “adb logcat” for Android or capture the log from Xcode for iOS.

You can use this code:

print( json.prettify( event ) )

to dump the event table.  Are you testing on Android or iOS?

Rob

Testing in Android

build 2018.3293  does not work either.

Will check the adb logcat shortly need to download the andoid sdk

Apparently our documentation is out of date.  There doesn’t seem to be a “sessionStarted” event any more. Instead you get an “init” event. In fact, there doesn’t seem to even be a “revmob.sessionStarted()” API call any more either. 

According to the other RevMob post (that you linked to in the top post), there also seems to be a requirement to add a string to the strings.xml file.  In your android block of build.settings, add this:

 android = { strings = { ["app\_name"] = "Your App Name", },

where “Your App Name” is the app name as you have it in the RevMob dashboard. If you build an app named “BubbasRevenge” in your build dialog but in RevMob you called it “Bubba’s Revenge”, you need to use the string as it’s in RevMob.

While I wouldn’t use the listener function to choose to show ads, just as a test, this is what my new revmob listener function looks like:

local function adListener( event ) print( json.prettify( event )) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) revmob.load( "banner", "5b033c60f14632.........." ) elseif event.phase == "loaded" then revmob.show( "5b033c60f14632..........", { yAlign="top" } ) end end

I’ll see about getting the documentation updated.

Rob

 I made string addition on build.settings.  Now the App will say “loaded”, however it will not show ad when revmob.show() is called.  I copy/pasted string from revmob dashboard.  Maybe I put it in wrong place?

[lua]

android =

    {

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.WRITE_EXTERNAL_STORAGE”,

            “android.permission.ACCESS_FINE_LOCATION”,

            “android.permission.ACCESS_COARSE_LOCATION”,

             “android.permission.ACCESS_NETWORK_STATE”,

        },

        strings =

        {

            [“app_name”] = “Kylie Jenner Trivia”,

        },

    },

[/lua]

Are you printing out the event table? You can’t know what else is going on without seeing what messages are showing in your device’s console log.

Maybe also share your code?

Rob

In question2.lua I will have printed to screen ‘event_phase = loaded’  Than zero ads will load.  It still Shows Ads on older builds 2016.3033 shows ads no problem.   Every time I use a the new build 2018.3293  it will not show the Ads

.  

Main.lua

[lua]

revmob = require( “plugin.revmob” )

bannerID = “5af9984ba30c3b1c882e7f5d”

–videoID =  “5af9984ba30c3b1c882e7f65”

–interID = “5af9984ba30c3b1c882e7f5f”

  

event_phase = nil

function adListener( event )

      

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

      local text=display.newText(“init =”…event.phase, 80, 150, “arial”, 45)

    end

    event_phase = event.phase

end

revmob.init( adListener, { appId = “5af9984ba30c3b1c882e7f5b”} )

[/lua]

ques1.lua

[lua]

revmob.load( “banner”, bannerID )

[/lua]

ques2.lua

[lua]

if  (event_phase == “sessionStarted”) then

  local text=display.newText("event_phase "…event_phase, 280, 400, “arial”, 45)

elseif  (event_phase == “loaded”) then

  local text=display.newText(“event_phase =”…event_phase, 280, 450, “arial”, 45)

elseif ( event_phase == “failed” ) then  – The ad failed to load

    local text=display.newText(“failed”, 280, 400, “arial”, 45)

else 

    local text=display.newText(“nads”, 280, 400, “arial”, 45)

end  

revmob.show( bannerID, { yAlign=“center” } )

[/lua]

So you are not printing out the value of the event table and looking for the results in the device’s console log?

Please require the “json” library at the top of main.lua then add this line to the top of your listener function:

print( json.prettify( event ) )

Also, there are two different ID values. The appId value: 

revmob.init( adListener, { appId = "5af9984ba30c3b1c882e7f5b"} )

comes from the list of applications:

Then each placement has an ID. Click on the App Name, then on the screen, scroll down to “Ad Units” and click on the gear icon and then on view in the list of placements:

Then on the next page, you get the id for the banner ad placement from the top of the page:

Once you get your ID’s straightened out, and you can get any messages from your device’s console log (Using Android Studio or adb logcat) then we can troubleshoot more, but without this information from the console log you’re just guessing as to what’s happening.

Okay I will download Android Studio to further troubleshoot this bug.

ID’S have been placed correctly.  Ads have shown before.  They are not the same

bannerID = "5af9984ba30c3b1c882e7f5d

PLACEMENTID  5af9984ba30c3b1c882e7f5b

I think you’ve missed one very critical part of this conversation. RevMob changed their plugin. There is enough evidence that what used to work won’t work with the new plugin and you have to adapt to the new system. You can’t count on “Ads have shown before” because you’ve not used this version of the plugin.

The PlacementID and the bannerID are going to be the same.  That isn’t the problem. Your “appId” is the same as your bannerId. These numbers should be different. The chance of them being the same is microscopically (like nearly impossible) to be the same.

In my screen shots above, my appId ends with “5c9821”. My bannerId (Default) ends with “5c9823”. Yes the numbers are close, but the numbers are unique. The AppId was created seconds before the the placementId was, so they are close in value.  Please make sure you’re using the right Id values.

Rob