Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Admob integration, what's my app id?
Started by yanuar Oct 12 2013 06:33 PM

28 replies to this topic
[TOPIC CONTROLS]
Page 1 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

yanuar

[GLOBAL: userInfoPane.html]
yanuar
  • Contributor

  • 256 posts
  • Corona SDK

Hi,
I'm trying to put ads using admob in my game. After registering my application, I'm still not sure where can I get my app Id from the admob control panel.

I can only see publisher Id but that's it..
So my question is : what's the app Id that I need to enter on ads.init? where do I get it (Admob)?

Thanks

[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

It's under the Monitize menu ont he AdMob site.  Click on your App and it will show you your different ad units and you can see your Ad unit ID.  That should be the ID You need.



[TOPIC: post.html]
#3

yanuar

[GLOBAL: userInfoPane.html]
yanuar
  • Contributor

  • 256 posts
  • Corona SDK

tbTZK4p.png

Hi Rob,

Thanks for the answer, I really appreciate weekend supports as I am basically just weekend developer as well.

I still couldn't find the monetize menu you're talking about in the admob control panel. Which is strange as I feel like I can't even follow a simple instruction :)


After looking around I think I found what I'm looking for. Is it this Mediation ID? It's the only way I can set up a banner ads for my application. Checking the Admob SDK docs I think this is the one they're talking about.

The only problem now is.. it's not working. When I call ads.init with this mediation ID I don't get any callback saying it's initialized properly or not. 

 

Has anyone had this problem before?

Thanks



[TOPIC: post.html]
#4

yanuar

[GLOBAL: userInfoPane.html]
yanuar
  • Contributor

  • 256 posts
  • Corona SDK

Hmm.. now that I read thoroughly the fine line again, could this be the Publisher ID? : 
"Each type of site or app has a specific version of Publisher Code required to integrate with the AdMob marketplace."
 

and this is the instruction for sdk implementation :

The five lines of code it takes to add a banner:

  • Import com.google.ads.*
  • Declare an AdView instance
  • Create it, specifying a unit ID—your AdMob publisher ID
  • Add the view to the UI
  • Load it with an ad

It says publisher ID, surely this is what Corona plugin should use too right?



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

I'm wonder if you're seeing the old interface.  There was a prompt that I clicked on that changed how things work and I've not been able to get back to the old thing. My stuff looks different.  Keep in mind, I don't really use this, much.  Hopefully someone else from the community who uses AdMob more regularly can answer  your questions.



[TOPIC: post.html]
#6

yanuar

[GLOBAL: userInfoPane.html]
yanuar
  • Contributor

  • 256 posts
  • Corona SDK

ok,

I tried everything, none of them worked and even uses the sample code : https://github.com/coronalabs/plugins-sample-ads-admob


The code is not that good and you need to fix a few lines to make sense though. I can't believe this sample code is the official admob implementation sample.


I guess I'll wait for another user to help me out on this, it can't be that hard isn't it? I know there's at least one guy who had the same problem as I am :)



[TOPIC: post.html]
#7

yanuar

[GLOBAL: userInfoPane.html]
yanuar
  • Contributor

  • 256 posts
  • Corona SDK

Just want to add, now that I finally figured it out :)

- It's actually called publisherID on your admob control panel. When you create a new app/site you'll be given a new unique publisher ID.

- ads.init doesn't yield the listener callback, only after you call ads.show

 

Hope this help others



[TOPIC: post.html]
#8

sagarpawaskar

[GLOBAL: userInfoPane.html]
sagarpawaskar
  • Enthusiast

  • 33 posts
  • Corona SDK

Hi,

 

I'm receiving this error - no app id was supplied to ads.init(), a test id was used.  Can anyone help? I have used pub id supplied by admob.



[TOPIC: post.html]
#9

nta84

[GLOBAL: userInfoPane.html]
nta84
  • Observer

  • 17 posts
  • Corona SDK

corona admob plugin not working with new Ad unit ID?

 

Ad unit ID: ca-app-pub-XXXXXXXXXXXXXXXXXX/xxxxxxxxxxxxx



[TOPIC: post.html]
#10

daniel_s

[GLOBAL: userInfoPane.html]
daniel_s
  • Observer

  • 4 posts
  • Corona SDK

Hi,

 

I'm receiving this error - no app id was supplied to ads.init(), a test id was used.  Can anyone help? I have used pub id supplied by admob.

Hi, I put the ad in adshow Id and I got the same message in the app

 

This is my code for banner in main.lua

 

ads.init( "admob", appID, adListener )
ads.show( "banner", { x=0, y=0, appId = "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxx" } )
 
Anyone know what it takes to put the Id claiming???
 
The publisher id that calls where it goes?


[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

ads.init( "admob", "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxx", adListener )
ads.show( "banner", { x=0, y=0 } )
 
Try that.


[TOPIC: post.html]
#12

daniel_s

[GLOBAL: userInfoPane.html]
daniel_s
  • Observer

  • 4 posts
  • Corona SDK

ads.init( "admob", "ca-app-pub-xxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxx", adListener )
ads.show( "banner", { x=0, y=0 } )
 
Try that.

Perfect, it works fine, very grateful and thank you very much.

 

Regards Dani.



[TOPIC: post.html]
#13

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

Hi everyone, I got the problem with ads on admob as when i built i always get error "No such file or directory" while i am trying to use plugin. Did i miss any configuration for ads api? Thank..



[TOPIC: post.html]
#14

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

and i also try the sample project from github replacing with new appid but the built always return null, and never get done with this. And  Do i have to be pro or something else
please help with this.



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

You don't need to be pro.  Its likely an issue with your build.settings or your code.  Can you post your build.settings and the contents of your console log where you're app is running?  If you don't know how to get your console log:

 

http://coronalabs.com/blog/2013/07/09/tutorial-basic-debugging/



[TOPIC: post.html]
#16

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

@Rob, I used this sample project below to build with edited on appid only

https://github.com/coronalabs/plugins-sample-ads-admob/

 

here is error console log

Runtime error
 ...-ads-admob-master.app/.build/libtemplate/Builder.lua:295: <error>{"status":32512,"message":"sh: /Applications/Xcode: No such file or directory"}</error>
stack traceback:
 [C]: ?
 [C]: in function 'assert'
 ...-ads-admob-master.app/.build/libtemplate/Builder.lua:295: in function 'checkError'
 ...-ads-admob-master.app/.build/libtemplate/Builder.lua:318: in function 'build'
 ?: in function 'buildExe'
 ?: in function <?:695>
Runtime error: ...-ads-admob-master.app/.build/libtemplate/Builder.lua:295: <error>{"status":32512,"message":"sh: /Applications/Xcode: No such file or directory"}</error>
stack traceback:
 [C]: ?
 [C]: in function 'assert'
 ...-ads-admob-master.app/.build/libtemplate/Builder.lua:295: in function 'checkError'
 ...-ads-admob-master.app/.build/libtemplate/Builder.lua:318: in function 'build'
 ?: in function 'buildExe'
 ?: in function <?:695>

and in built.setting there was nothing edited. 
As I test there something error with plugins field in built.setting, when i off that field the build is fine.


[TOPIC: post.html]
#17

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

Something's not right.  I just downloaded it, didn't change a thing and it built. Of course I can't run it because I didn't change any AppID's, but you're getting this error during build right?

 

What version of Corona SDK are you running?

 

Can you post the build.settings?



[TOPIC: post.html]
#18

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

yes, at first i use with 2013.1202 version to build, it error

then i change to 2014.2189 version but also the same error occur with those message above



[TOPIC: post.html]
#19

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

I use the same code and build with android, it working fine and show ads successful on android device, but during the built for IOS I always got those error above!



[TOPIC: post.html]
#20

joelkaka

[GLOBAL: userInfoPane.html]
joelkaka
  • Observer

  • 23 posts
  • Corona SDK

What if we are looking for loading a banner ad during a scene AND a exit interstitial ad at the exit of scene ? do I need to call ad.init twice in same file with different IDs ?

(note that this is for the new admob , old admob it was clear. new admob has IDs for each "banner" or "intersitial" )

[TOPIC: post.html]
#21

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

@lonly_son, Engineering things this is the result of a faulty Xcode install on your computer.  Please verify you're point to the right place:

 

From the terminal do:

 

xcode-select -p

 

and make sure it says:

 

/Applications/Xcode.app/Contents/Developer

 

If it does, I would remove and re-install Xcode making sure you have the latest version.  If it's not pointing to that, make sure that path exists:

 

ls -l /Applications/Xcode.app/Contents/Developer

 

It should output this:

total 0
drwxr-xr-x   3 root  wheel  102 Apr 11 16:44 Documentation
drwxr-xr-x   6 root  wheel  204 Apr 11 16:44 Library
drwxr-xr-x   6 root  wheel  204 Apr 11 16:44 Makefiles
drwxr-xr-x   5 root  wheel  170 Apr 11 16:44 Platforms
drwxr-xr-x   3 root  wheel  102 Jan 15 15:00 Toolchains
drwxr-xr-x  18 root  wheel  612 Apr 11 16:46 Tools
drwxr-xr-x   7 root  wheel  238 Apr 11 16:46 usr

 

(well the dates and times may be different)

If it doesn't, then you might need to run:

 

xcode-select -s /Applications/Xcode.app/Contents/Developer

 

Rob



[TOPIC: post.html]
#22

lonly_son

[GLOBAL: userInfoPane.html]
lonly_son
  • Observer

  • 9 posts
  • Corona SDK

Thank Rob, I'll try it.



[TOPIC: post.html]
#23

joelkaka

[GLOBAL: userInfoPane.html]
joelkaka
  • Observer

  • 23 posts
  • Corona SDK

Rob , 

 

I think the new admob, for some reason is not showing interstitial ads. Have you tried it ?

 

Thanks!



[TOPIC: post.html]
#24

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,714 posts
  • Corona Staff

Can I get you to file a bug report on this.  Make sure to include your build.settings and config.lua that you are using.

 

Thanks

Rob



[TOPIC: post.html]
#25

joelkaka

[GLOBAL: userInfoPane.html]
joelkaka
  • Observer

  • 23 posts
  • Corona SDK

Just found out Corona has a admob-V2 in 2014.2189. will try it out today and check if interstitial works!




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]