Admob integration

plugins=

  {

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

     {

     publisherId=“com.coronalabs”,

     supportedPlatform={iphone=true, android=true}

     }

  }

Above is the code I added for my build.settings file so I can eventually integrate admob ads into my app, and publish it on the app store. My app is intended to be played solely in landscape mode. When i put that piece of code …

settings =

{

  

orientation =

{

– Supported values for orientation:

– portrait, portraitUpsideDown, landscapeLeft, landscapeRight

default = “landscapeRight”,

supported = { “landscapeRight”, }

},

in between the first curly brace and orientation my simulator auto switches to portrait/vertical mode messing up my app. But if I put my piece of code at the end of the build.settings file in the --ANDROID section then my device stays in landscape (like it is supposed to). So does the piece of code I am implementing have to be right after the first curly brace in settings={…   

or can it be at the end of the file. If it has to be right after the settings=  then how can I fix it so my app stays in landscape and not switch to potrait mode? But can I leave my piece of code in the Android Section so that way my device stays landscape or will it not work if I do that?

The build.settings file is just a really big Lua table names “settings”. All subtables like orientation, plugins, etc. are sub-tables of the settings table:

settings = {       orientation = {       },       plugins = {       },       android = {       }, }

This tutorial is a bit dated with regards to what all you can put in build.settings, but for your purpose it should help you understand what build.settings is.

https://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Since that tutorial was written there are now sub-tables for “tvos”, “osx”, “win32” and “splashScreen” that the tutorial doesn’t mention.

The build.settings file is just a really big Lua table names “settings”. All subtables like orientation, plugins, etc. are sub-tables of the settings table:

settings = {       orientation = {       },       plugins = {       },       android = {       }, }

This tutorial is a bit dated with regards to what all you can put in build.settings, but for your purpose it should help you understand what build.settings is.

https://coronalabs.com/blog/2014/07/08/tutorial-understanding-build-settings/

Since that tutorial was written there are now sub-tables for “tvos”, “osx”, “win32” and “splashScreen” that the tutorial doesn’t mention.