TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
12/05/13 07:50 AM (11 years ago)

What happend if you do not have bt_screen_customhtml.xml file to add admob

Hi, I don't know why in my source I can not find "bt_screen_customhtml.xml", I only see "bt_screen_customURL.xm", then I follow the instruction to ad admob http://www.buzztouch.com/files/howtos/New%20Admob%20integration%20for%20Android.pdf but get the error "Unhandled event loop exception No more handles" and I also do not see the add when I run test the app on my device. Do you have any suggestion for me ? Thank you!
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/05/13 09:59 AM (11 years ago)
I am not sure why your source code does not have the custom html's layout file included in it. Have you tried downloading the project again? Just give it a try and might be possible it might get included in your source code. The contents of the custom html and custom url layout files are almost same since both are webview in essence. But if you are not an advance user i would recommend trying to re download the source code till all the files are included in it. Also i never had seen any error such as "Unhandled event loop exception No more handles" so am not sure why you are getting this error or what have you missed from my tutorial.
 
TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
like
12/05/13 10:01 AM (11 years ago)
I tried redownload, there is not that file in my project. I also find in all my computer, there is not that file. My project works fine in both Android and iOS, so there is no problem with source code I think. Is it a "MUST HAVE" file when you create a project ? I do not use any normal html page, I only use URL to point to a created web address.
 
LA
Aspiring developer
Profile
Posts: 3280
Reg: Aug 16, 2012
Jerseyville, IL
42,900
like
12/05/13 02:52 PM (11 years ago)
I don't get all my files either on self-hosted! LA
 
TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
like
12/05/13 03:14 PM (11 years ago)
Oh, so that problem is caused by self-host server ? But I guess most people here create app using their self-host server, and many of them do have ad in the apps, so that won't be a problem with them ?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/05/13 07:29 PM (11 years ago)
I get whats happening here. Its confusion and nothing else. The BT uses a smart download method while creating the project download. It includes only those plugin files necessary for the project. Suppose your project includes a simple menu, custom url, image gallery, and apprater plugins then when you download the project file you get only the .java (class files) and .xml (layout files) which are necessary. No other files are downloaded unless you choose them in the controlpanel. Since your project does not have any custom html plugin in it, no files relating to that plugins are included in it. As far as the tutorial for including admob is concerned, you have not read it properly. The tutorial was made using the custom html plugin. At the bottom of the tutorial i have made a note that you can implement the same code in any other plugin that you want the ads to show. So follow the same steps in the customurl.xml file and you will be good to go with the admob ads on your custom url screens. Hope i have explained it clearly.
 
TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
like
12/06/13 06:38 AM (11 years ago)
Yes, there is some light in my problem here. I can understand what you suggested, but I could not figure out where is the right place to add the two codes you have at step 4. Because in my "bt_screen_customURL.xm" file, there is not 2 code marks as your file in the tutorial, I tried to add at some places that I guess is for the layout but there are many errors beside where I added. Here is where I tried: after: //flag as created.. didCreate = true; then I add: <com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adSize="SMART_BANNER" ads:adUnitId="YOUR_APP_ID_GOES_HERE" ads:loadAdOnCreate="true" android:layout_alignParentBottom="true" ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" /> And the code: xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" I tried to add at different places above that but all show error. So could you tell me where is the right place to add that ?
 
TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
like
12/09/13 08:21 AM (11 years ago)
Anybody knows where should I add this ?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/09/13 10:12 AM (11 years ago)
I think you have not read the tutorial completely. You seem to have added the code in the .java file. Actually you need to add that code in the .xml file. Have a look at the tutorial document properly, i have put some screenshots in it so it should be easy for other users to understand it properly. Take a look at it and you will get admob working in your app by following the steps in the tut.
 
TooT
I hate code!
Profile
Posts: 87
Reg: May 12, 2013
Singapore
870
like
12/10/13 02:21 AM (11 years ago)
Thank you, yes, I miss-taken the wrong file, to be precise, it should be "screen_customurl.xml" under res\layout Thanks for pointing out my problem and the great instruction file, Sandeep! I really appreciate that !
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/20/13 03:46 PM (11 years ago)
I can't find the "bt_screen_customhtml.xml" or "screen_customurl.xml" under res\layout in my project, I only see BT_activity_host.xml and bt_activity_start.xml... where do I add the above admob code? using BT v3 seems things have really changed.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/20/13 07:23 PM (11 years ago)
@KennedyE- are you sure you are using the custom url plugin in your screen in your project? Only those plugin files (both java and xml files) are included in your project which you use in the project. If you want all the plugin files in your project then while downloading the project file choose to select all the plugins manually in your control panel. Nothing has changed since i wrote this tutorial either in old 2.0 core or 3.0 core.
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/21/13 03:18 AM (11 years ago)
@Sandeep it seems you are very good in admob integration. I don't understand what you mean above. I have finished my project, where exactly do I put the above admob code? Are there different bt_screen... or screen_... under res\layout in a project to put the code? Also how many screen do you put the code? I thought every project has bt_screen_customhtml.xml where you can just add the admob code as discribed in your tutorial?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/21/13 04:40 AM (11 years ago)
If you read the tutorial neatly it will become clear to you that the tutorial was made on custom html plugin. If your app does not have that plugin then you are searching a thing which does not exist in your project. Tell me which plugin you use in your project. I will then tell you where to add the codes for admob. Actually you can do it yourself on any plugin but it seems you are now here.
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/21/13 08:11 AM (11 years ago)
Ok, I am using the Menu Image Advanced plugin, thanks!
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/21/13 02:17 PM (11 years ago)
Meanwhile, @Sandeep, Admob has made Interstitial ads available to developers all over the world in a newsletter yesterday, just to inform you. Ok, I am using the Menu Image Advanced plugin any idea where to put the admob code now?
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/22/13 11:47 PM (11 years ago)
@KennedyE- Menu list plugins are not ideal for having banner ads but you can use interstitial ads in this plugin. If you send me your project i might be in a better position to understand whether your app needs banner ads in it or not. Also i might be able to add interstitial ads if needed if you provide details of your ad interstitial ad unit and other stuffs. The new admob is not yet available as of now in India but i see that they have stated in the blog that interstitial ads are now available to all devs. I am not yet sure whether this applies only to new admob or the legendary admob too. You can contact me directly at- sandeepkurne (at) gmail (dot) com. I will take a look at your project and work on adding admob to it when i get time.
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/23/13 08:35 AM (11 years ago)
How to know menu that accept banner ads? I followed your pdf instruction to add banner ads and it worked on my screens only and did not work on the Menu Image Advanced plugin(list row) itself as you rightly said. As for adding interstitial ads I really want to learn how, I could pay you if you can teach using pdf or video, thanks!
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
12/23/13 10:01 AM (11 years ago)
Since the appstore is now closed for holidays, i am going to give some attention towards upgrading my android apps. I have not touched eclipse since this october. While updating the android apps i will try and see if the interstitial ads are available for me or not. If they are available, then i will come up with a tutorial for that. Actually you can add banner ads on menu plugins too but they do not work good on menu plugins nicely on android. The reason is that there are many devices with many different sizes. So to keep it simple always use interstitial ads on such menu screens.
 
KennedyE
Android Fan
Profile
Posts: 373
Reg: Dec 07, 2013
PH, Nigeria
3,730
like
12/23/13 12:41 PM (11 years ago)
I will be very glad if you can come up with detailed tutorial on how to add interstitial ads on such menu screens, thanks dear.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.