How do I add ads in my game?

Get help using Construct 2

Post » Fri Jun 09, 2017 2:33 pm

Hello! I made a game and used CocoonJS to add ads to my game. I want to use admob to do this. I exported the game using Cordova and XDK and now I am trying to publish my game (first time ever) and in my Google Play account there is an option called In-app products. When I click that it appears "To add in-app products, you need to add the BILLING permission to your APK." and "To add in-app products, you need to set up a Google Payments merchant account.". Do I need to do this, for ads, or this is only for when you buy stuff inside the game (gems or crystals or stuff like that)? Also, if I need to do this, how can I add Billing permission to my app. Is this done when I make the setting for SDK build? Thank you!
B
4
Posts: 30
Reputation: 266

Post » Mon Jun 12, 2017 2:30 am

Silviu wrote:Hello! I made a game and used CocoonJS to add ads to my game. I want to use admob to do this. I exported the game using Cordova and XDK and now I am trying to publish my game (first time ever) and in my Google Play account there is an option called In-app products. When I click that it appears "To add in-app products, you need to add the BILLING permission to your APK." and "To add in-app products, you need to set up a Google Payments merchant account.". Do I need to do this, for ads, or this is only for when you buy stuff inside the game (gems or crystals or stuff like that)? Also, if I need to do this, how can I add Billing permission to my app. Is this done when I make the setting for SDK build? Thank you!

Hello there,

First, you need account with AdMob: https://www.google.com/admob/ then if you are done. sign-in to your account then go, Monetize New App --> Add Your App Manually. Then write your app name and chose the platform. click Add after that, then chose Banner and write a name for it down by "Ad unit name". After that click skip at Firebase for now. Finally Cilck at "Done".
it will take you back to new window. Chose your App from the left. Look at the right and copy your "Ad unit ID"
look at the picture:

http://imgur.com/ru44fcS

Second, in your C2 Project open it and do as follows: Insert New Object --> Admob Ads

Third, click at the Admob Ads in your C2. You will see its properties. paste your "Ad unit ID" to "Banner ID ( Android )" Or
Banner ID ( IOS ).

Fourth, do as follow:

Add event -> System -> On Start of Layout
-Add action -> AdmobAds -> Preload banner ad
-Add action -> AdmobAds -> Show banner -> Position: Bottom center -> size: Smart Banner -> Done

Then add this plugin to your Config.xml File:
Code: Select all
    <plugin name="github.com/cranberrygame/cordova-plugin-ad-admob" source="npm" ></plugin>




I hope this help...

Good Luck :mrgreen:
B
25
S
10
G
8
Posts: 49
Reputation: 6,225

Post » Mon Jun 12, 2017 1:49 pm

Message: Silviu can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
alajajm wrote:
Silviu wrote:Hello! I made a game and used CocoonJS to add ads to my game. I want to use admob to do this. I exported the game using Cordova and XDK and now I am trying to publish my game (first time ever) and in my Google Play account there is an option called In-app products. When I click that it appears "To add in-app products, you need to add the BILLING permission to your APK." and "To add in-app products, you need to set up a Google Payments merchant account.". Do I need to do this, for ads, or this is only for when you buy stuff inside the game (gems or crystals or stuff like that)? Also, if I need to do this, how can I add Billing permission to my app. Is this done when I make the setting for SDK build? Thank you!

Hello there,

First, you need account with AdMob: https://www.google.com/admob/ then if you are done. sign-in to your account then go, Monetize New App --> Add Your App Manually. Then write your app name and chose the platform. click Add after that, then chose Banner and write a name for it down by "Ad unit name". After that click skip at Firebase for now. Finally Cilck at "Done".
it will take you back to new window. Chose your App from the left. Look at the right and copy your "Ad unit ID"
look at the picture:

http://imgur.com/ru44fcS

Second, in your C2 Project open it and do as follows: Insert New Object --> Admob Ads

Third, click at the Admob Ads in your C2. You will see its properties. paste your "Ad unit ID" to "Banner ID ( Android )" Or
Banner ID ( IOS ).

Fourth, do as follow:

Add event -> System -> On Start of Layout
-Add action -> AdmobAds -> Preload banner ad
-Add action -> AdmobAds -> Show banner -> Position: Bottom center -> size: Smart Banner -> Done

Then add this plugin to your Config.xml File:
Code: Select all
    <plugin name="github.com/cranberrygame/cordova-plugin-ad-admob" source="npm" ></plugin>




I hope this help...

Good Luck :mrgreen:

Thank you for this! Is all this free? Or do I need to pay something to google? (For now they didn't ask for anything but I was wondering if later they will) Thank you!
B
4
Posts: 30
Reputation: 266

Post » Tue Jun 13, 2017 12:32 am

Silviu wrote:
alajajm wrote:
Silviu wrote:Hello! I made a game and used CocoonJS to add ads to my game. I want to use admob to do this. I exported the game using Cordova and XDK and now I am trying to publish my game (first time ever) and in my Google Play account there is an option called In-app products. When I click that it appears "To add in-app products, you need to add the BILLING permission to your APK." and "To add in-app products, you need to set up a Google Payments merchant account.". Do I need to do this, for ads, or this is only for when you buy stuff inside the game (gems or crystals or stuff like that)? Also, if I need to do this, how can I add Billing permission to my app. Is this done when I make the setting for SDK build? Thank you!

Hello there,

First, you need account with AdMob: https://www.google.com/admob/ then if you are done. sign-in to your account then go, Monetize New App --> Add Your App Manually. Then write your app name and chose the platform. click Add after that, then chose Banner and write a name for it down by "Ad unit name". After that click skip at Firebase for now. Finally Cilck at "Done".
it will take you back to new window. Chose your App from the left. Look at the right and copy your "Ad unit ID"
look at the picture:

http://imgur.com/ru44fcS

Second, in your C2 Project open it and do as follows: Insert New Object --> Admob Ads

Third, click at the Admob Ads in your C2. You will see its properties. paste your "Ad unit ID" to "Banner ID ( Android )" Or
Banner ID ( IOS ).

Fourth, do as follow:

Add event -> System -> On Start of Layout
-Add action -> AdmobAds -> Preload banner ad
-Add action -> AdmobAds -> Show banner -> Position: Bottom center -> size: Smart Banner -> Done

Then add this plugin to your Config.xml File:
Code: Select all
    <plugin name="github.com/cranberrygame/cordova-plugin-ad-admob" source="npm" ></plugin>




I hope this help...

Good Luck :mrgreen:

Thank you for this! Is all this free? Or do I need to pay something to google? (For now they didn't ask for anything but I was wondering if later they will) Thank you!


No it's free. Actually they are making money from your app from the adviser that pay them to show his/her ad product.
B
25
S
10
G
8
Posts: 49
Reputation: 6,225


Return to How do I....?

Who is online

Users browsing this forum: warmty, Yahoo [Bot] and 8 guests