infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
08/29/13 03:09 PM (10 years ago)

How to add AdMob code to Android Apps

Hi, doe's anyone knows a step by step tut on How to add Admob to Android App? I've been trying to do it by my own but realize i don't really know what I'm doing. what i want is to integrate Admob code in to my App so it shows on my App. is there anyone who can offer a little help? Thanks.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
08/29/13 03:33 PM (10 years ago)
Hi @infogeekApps, I'm doing my App tomorrow so I can assist you then, if you like? LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
08/29/13 03:45 PM (10 years ago)
that will be great, but I'm located in The Netherlands :-) is it possible for you to keep a log of all the steps? what do you think about that?
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
08/29/13 04:12 PM (10 years ago)
No problem @infogeekApps! LA
 
0z2000tv
Aspiring developer
Profile
Posts: 315
Reg: Sep 10, 2011
Nashville
11,950
like
08/29/13 04:47 PM (10 years ago)
LA, If you care to share the instructions you are providing infogeekapps I would appreciate a copy. It took 2 years for me to release my first Android App after a half dozen iOS apps. I spent a week trying to monetize the Android App. I am code challenged. Mike
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
08/29/13 05:19 PM (10 years ago)
Hi LA, I am also interested. I have my first android app ready. I have no idea where to start in order to monetize my app with Android. If you are willing to help us with your step by step guide, I would be very happy and excited. Wish to hear from you soon. Thank you. Tommy
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
08/29/13 05:21 PM (10 years ago)
Hey @0z2000tv and @CreativeAppsPublis....no problem! LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
08/31/13 04:53 AM (10 years ago)
Hey LA, how did it go? I'm still tying to ad the codes myself but no success yet. looking forward to your guide whenever you're ready. infogeek
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
08/31/13 05:47 AM (10 years ago)
Hey Guys, I am sure LA is working on it right now. I think we all are going to hear from him soon. By the way, does anyone have any ideas whether REVMOB latest SDK complies with the latest Google Play Developer Policies Update (as at As of August 23, 2013)? Any comments or suggestions? Thanks.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
08/31/13 08:11 AM (10 years ago)
Hey gang, A friend of mine on here will be writing up the tutorial and submitting to the how to section for approval! LA
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
08/31/13 07:39 PM (10 years ago)
Hi everyone, Setting up admob in your android apps is super easy and it takes only upto 2-3 minutes (if you are that efficient) or in worst case only 6-7 minutes. There are many tutorials i have written in different posts about setting up admob in android apps. Recently google has introduced new admob replacing it with the legendary admob. The new admob is available in most of the western countries but not yet available to asian countries like India. I am not sure about other countries. The introduction of new admob took place last week and so does comes the complication about setting the app, understanding basics of linking your legendary admob account to new one, and also linking your google playstore apps to your new admob dashboard. Well i have not used the new admob since its not available in my country but i had a look the new admob accounts oc couple of my friends here. One of them is LA. I have new admobs sdk in my hand and also the documentation of how to implement it in your android app. At first i thought that it might be different than the older one but soon realised that the new codes have not changed at all... Any way for those who are interested follow the steps given below. The following steps are applicable for both old and new admob. The only difference would be the sdk and nothing else. Steps: Step 1. - Download the Admob sdk unzip it and then put that jar file in the libs folder of your project in eclipse. - Right click on the project name and select Build Path--> Configure Build Path. Make sure the Libraries tab is selected at the top. Then click Add External JARS... on the right side of the window. Navigate to where you saved the unzipped AdMob sdk and select the .jar file. - Now in the same pop up window, select Order and Export tab which is on the right side of Libraries tab. Check mark the google admob sdk and then click OK button. Step 2. Add these two Lines in AndroidManifest.xml before the closing of the application tag. ..................................................... <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> ..................................................... Step 3. - Right click your project name and select Properties. Select Android and then select Google API level 13. This is an important step to follow or else you will get errors. The admob is compliant with the sdks over level 13. ..................................................... Step 4. Modify your bt_screen_customhtml.xml with adding following code. ..................................................... <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" /> .................................................... Note :- Don't Forget to Add --- xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" After <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" .................................................... Remember that the bt_screen_customhtml.xml should look like below after you put all the above codes in it. .................................................... <?xml version="1.0" encoding="UTF-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" android:id="@+id/containerView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@android:color/transparent" > <LinearLayout android:id="@+id/subContainer" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center_horizontal" android:orientation="vertical" > <WebView android:id="@+id/webView" android:layout_width="fill_parent" android:layout_height="fill_parent" > </WebView> </LinearLayout> <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" /> </RelativeLayout> .................................................... You have to put your ad unit id in place of YOUR_APP_ID_GOES_HERE. The above code is done in the custom HTML layout file, you can similarly put those codes in any other layout file where you want the ads to show. Hope this helps you all in setting up admob in your apps. I will submit the tutorial to BT with some screenshots to make it more simple to understand. ***EDIT***- The PDF file of tutorial is available and can be downloaded from my dropbox from the following link- https://dl.dropboxusercontent.com/u/61663890/Tutorials/New%20Admob%20integration%20for%20Android.pdf
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/01/13 12:18 PM (10 years ago)
Hallo Sandeep, thanks a lot for this usual information, i'm going to work on it right-away. I'll late you all know how it wend. ones again, thank you Sandeep!!
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/01/13 01:16 PM (10 years ago)
@infogeekApps, Susan @buzztouch just started a new post saying it's in the how to section now. LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/01/13 02:20 PM (10 years ago)
thanks, i will check that one out to :-)
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/01/13 02:27 PM (10 years ago)
ow, just an other question if i may, in the document it says; modify bt_screen_customhtml.xml but i only see bt_screen_customhtmlxml.yava is that the same?
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/01/13 02:35 PM (10 years ago)
No, look under the Layouts folder! LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/01/13 03:19 PM (10 years ago)
yes i found it, but after i put in the codes provided and switch fro google APIs 2.2 level 8 to 3.2 level 13, i get error in Layouts/screen_Customhtml.xml and also in the src folder :-( the lines below has errors <LinearLayout android:id="@+id/subContainer" android:layout_height="fill_parent" android:layout_width="fill_parent" android:gravity="center_horizontal" android:orientation="vertical"> <WebView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/webView" android:layout_width="fill_parent" android:layout_height="fill_parent"> </WebView> </LinearLayout>
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/01/13 03:22 PM (10 years ago)
Switch to API 17. Admob don't support anything under. I believe it's 17. See if that works! LA
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/01/13 06:10 PM (10 years ago)
@infogeekApps- what sort of errors are you getting in the layout folder... i think its xmlns:android="http://schemas.android.com/apk/res/android" ... if so just clean project and the errors will be gone. You also say that you are getting errors in the class(.java) files, which class files are showing errors and what sort of errors?
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/02/13 05:58 AM (10 years ago)
hey Sandeep, thanks that worked out fine. the other errors i get are a bunch of the above errors in AndroidManifast, Description Resource Path Location Type R cannot be resolved to a variable BT_screen_customHTML.java /BT_activity_root/src/com/fengshuiapp line 569 Java Problem and also in com.fengshuiapp/BT_act_controller Etc. i'm using the google APIs level 13. any idea? thanks.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/02/13 07:22 AM (10 years ago)
As long as it's 4.0.2 or higher, then it should work! Try a clean and refresh. I that does not clear up the errors a good restart of Eclipse never hurts! If still errors try changing it to 4.3 API 18 just to see. LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/02/13 01:42 PM (10 years ago)
OK, whenever i change to any level higher or lower than 2.2 level 8, i get errors. and also, when i add the below line's to AndroidManifest.xml, i get error <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> I've checked for updates for Eclipse but, there warned any. could it be that i mis this line? <!-- Declaration for Admob ad activity --> is it possible that I'm using the wrong Eclipse version on the tur it didn't show that part. I'm using Eclipse, Eclipse IDE for Java Developers Version: Kepler Release Build id: 20130614-0229
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/02/13 04:51 PM (10 years ago)
@infogeeksApps, Can you post a what logcat says and your errors? You following every step of @Sandeep's tutorial? Did you do a build project after you copied the jar file from the website? LA
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/02/13 07:11 PM (10 years ago)
@infogeeksApps- i think that you are not compiling the app against the Google API but Android API... Remember that all bt apps must be compiled using the Google API. The following line is just a comment i have added in the manifest which says i have put admob in it-- <!-- Declaration for Admob ad activity --> It is not a code and has nothing to do with admob integration. Its just for reference. The following line is the declaration of admob and it needs either android or google api level 13 or more but since its buzztouch app you need to use google api 13 or higher and not android api--- <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> You say you are getting the following error- Description Resource Path Location Type R cannot be resolved to a variable BT_screen_customHTML.java /BT_activity_root/src/com/fengshuiapp line 569 Java Problem and also in com.fengshuiapp/BT_act_controller Etc. R cannot be resolved to a variable is one of the common error in android and it has many reasons... not sure whats causing this error in your project but have a look at the following link and check if any of the solution works for you--- http://stackoverflow.com/questions/7824730/r-cannot-be-resolved-to-a-variable
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/03/13 01:12 PM (10 years ago)
hello everyone, @Sandeep- I've try to find a solution trough the link you provided but still did not find a real solution. @LA- i do a rebuild after every change i make. however, now i can select an APIs higher than 4.0.2, errors are fixed except the errors in the src folder. the errors are in the below area's, /BT_activity_root/src/com/fengshuiapp/BT_activity_base.java /BT_activity_root/src/com/fengshuiapp/BT_activity_root_tabs.java /BT_activity_root/src/com/fengshuiapp/BT_activity_root.java /BT_activity_root/src/com/fengshuiapp/BT_device.java /BT_activity_root/src/com/fengshuiapp/BT_downloader.java /BT_activity_root/src/com/fengshuiapp/BT_imageLoader.java /BT_activity_root/src/com/fengshuiapp/BT_screen_customHTML.java /BT_activity_root/src/com/fengshuiapp/BT_screen_menuListSimple.java /BT_activity_root/src/com/fengshuiapp/BT_screen_pdfDoc.java /BT_activity_root/src/com/fengshuiapp/BT_viewUtilities.java /BT_activity_root/src/com/fengshuiapp/GCMIntentService.java maybe it seems familiar to you guys.
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/03/13 01:15 PM (10 years ago)
p.s., the error sign is a yellow square with a exclamation mark.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/03/13 01:20 PM (10 years ago)
@infogeekApps, What are the errors src folder? You are just showing the different plugins..etc..They the R cannot be resolved to a variable? LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/03/13 01:35 PM (10 years ago)
@LA, no day all are something with, >>>>> is deprecated
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/03/13 01:40 PM (10 years ago)
They are fine! They are warnings with the yellow. As long no errors, red ones, then it will run on device! LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/03/13 01:51 PM (10 years ago)
thanks, I'm going to tray it and see what happens.
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/04/13 01:16 PM (10 years ago)
@LA and @Sandeep, first of all, thank you guys so much for being so patiently with me. all this is totally new to me but, i believe I'm going to learn a lot and make some great Applications and with you guys helping me lately I've already learn a lot. so @LA, i have exported the project to APK file and installed it on my device, it works fin but, no Ads are showing. i wonder if I've forgotten something. what could it be any idea?
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/04/13 01:18 PM (10 years ago)
Good to hear @infogeekApps! Did you put your id in your project? LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/04/13 01:58 PM (10 years ago)
yes if you mean my Publisher ID? yes i did put my ID in to, ads:adUnitId= it looks like this android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" ads:adSize="SMART_BANNER" ads:adUnitId="MY-ID-IS-HERE" ads:loadAdOnCreate="true" android:layout_alignParentBottom="true" ads:testDevices="TEST_EMULATOR, TEST_DEVICE_ID" />
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/04/13 02:02 PM (10 years ago)
You had to miss something. Did you link to it in your dashboard of admob? LA
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/04/13 02:15 PM (10 years ago)
I'm not sure, i think i may have missed that. what i did was, I've downloaded the jar file but after that i did not do anything els in the Admob dashboard.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/04/13 02:19 PM (10 years ago)
Yeah go back to the admob site and enter you username and password, then select add an App. LA
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/04/13 07:03 PM (10 years ago)
@infogeekApps- In one of your earlier post you said you have put your app id in the layout file in the following field- ads:adUnitId="MY-ID-IS-HERE" Did you really put it as it is typed? MY-ID-IS-HERE or did you put your app id that you got from the admob? You need to create an app in admob first by filling many details as to type of app (in this case it will be android app), name of app, project name In your dashboard click site and apps tab--> add site/app-->select type of site or app (here it will be andorid)--> fill App name, package url (you will find it in manifest it will look something like com.yourappname so the package url will look like this- market://details?id=com.yourappname), category and description of app. then click continue after filling up the captcha (security image). Your app will be created. After that you need to click manage settings. Here you will find your app id. this is the one you need to put in your layout file.
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/05/13 03:32 AM (10 years ago)
Hi Sandeep, I have a question here. Do I need to fill in the "Android Package URL" in my Admob Dashbord whereas my app is not live yet. I mean I haven't submitted my app to the google play store. I need your suggestion on this. Thank you.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/05/13 04:20 AM (10 years ago)
Yes, you have to set the android package url. Remember that your app url will be always http://play.google.com/details?id=com.yourappname on google playstore and when the users download your app from google playstore android app it will be market://details?id=com.yourappname In short to figure out what your app package url will be just add your package name after --- market://details?id=
 
infogeekApps
Android Fan
Profile
Posts: 23
Reg: Aug 05, 2013
Utrecht
730
like
09/05/13 02:12 PM (10 years ago)
@Sandeep, yes i did put my App ID in place but i did not formulated the right url but yesterday i did and now it works perfectly. @ LA, thank you men, after you've suggested to go back and Edit the Admob dashboard en linked it to my App today I've tested it on my device and now i can see Ad's showing. guys again, thanks a lot you've been vary helpful.
 
LA
Aspiring developer
Profile
Posts: 3278
Reg: Aug 16, 2012
Jerseyville, IL
42,880
like
09/05/13 02:35 PM (10 years ago)
Awesome! LA
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/05/13 07:50 PM (10 years ago)
All the best! :)
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/06/13 07:35 AM (10 years ago)
Hi Sandeep, I have been following your guide. I have added all the codes into my project. Everything seems to be just fine. However, I cannot run my app on the emulator. I have just the property of my project to Google API 13. And there is no code errors after I have done a clean on my project. But the app just cannot run in my emulator. Here is the Console Message: [2013-09-06 22:26:57 - kettlebellworkoutroutines] Android Launch! [2013-09-06 22:26:57 - kettlebellworkoutroutines] adb is running normally. [2013-09-06 22:26:57 - kettlebellworkoutroutines] Performing com.kettlebellworkoutroutines.BT_activity_root activity launch [2013-09-06 22:26:57 - kettlebellworkoutroutines] Automatic Target Mode: launching new emulator with compatible AVD 'buzztouch_v2.0' [2013-09-06 22:26:57 - kettlebellworkoutroutines] Launching a new emulator with Virtual Device 'buzztouch_v2.0' [2013-09-06 22:27:05 - kettlebellworkoutroutines] New emulator found: emulator-5554 [2013-09-06 22:27:05 - kettlebellworkoutroutines] Waiting for HOME ('android.process.acore') to be launched... [2013-09-06 22:28:17 - kettlebellworkoutroutines] HOME is up on device 'emulator-5554' [2013-09-06 22:28:17 - kettlebellworkoutroutines] Uploading kettlebellworkoutroutines.apk onto device 'emulator-5554' [2013-09-06 22:28:22 - kettlebellworkoutroutines] Installing kettlebellworkoutroutines.apk... [2013-09-06 22:30:31 - kettlebellworkoutroutines] Failed to install kettlebellworkoutroutines.apk on device 'emulator-5554! [2013-09-06 22:30:31 - kettlebellworkoutroutines] (null) [2013-09-06 22:30:31 - kettlebellworkoutroutines] Launch canceled! I need your advice on this. Thanks.
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/06/13 06:22 PM (10 years ago)
Hey Guys, Just to add on some updates here... Okay, before integrating Admob into my project in eclipse, I set the property to Google API Level 8 & my Emulator was also set to Google API Level 8. My app then worked perfectly fine with no errors and problems. After integrating Admob into my project in eclipse, I then set the property to Google API Level 13 & my Emulator is also set to Google API Level 13. There is NO red errors signs in my project (please refer to my Google Doc Link below). However, my app is not running in my emulator. I have tried to do a project clean and refresh as well as restart eclipse, still I have no luck with it. https://docs.google.com/document/d/1T6pGIG75SO9Cnx4b8Lm9zhI0b4BmcJ-NcxAhNIbe7nM/edit?usp=sharing I cannot copy the logcat message as it keeps on running nonstop. Here is my Console message: [2013-09-07 07:58:08 - kettlebellworkoutroutines] ------------------------------ [2013-09-07 07:58:08 - kettlebellworkoutroutines] Android Launch! [2013-09-07 07:58:08 - kettlebellworkoutroutines] adb is running normally. [2013-09-07 07:58:08 - kettlebellworkoutroutines] Performing com.kettlebellworkoutroutines.BT_activity_root activity launch [2013-09-07 07:58:08 - kettlebellworkoutroutines] Automatic Target Mode: launching new emulator with compatible AVD 'buzztouch_v2.0' [2013-09-07 07:58:08 - kettlebellworkoutroutines] Launching a new emulator with Virtual Device 'buzztouch_v2.0' [2013-09-07 07:58:15 - kettlebellworkoutroutines] New emulator found: emulator-5554 [2013-09-07 07:58:15 - kettlebellworkoutroutines] Waiting for HOME ('android.process.acore') to be launched... [2013-09-07 08:02:10 - kettlebellworkoutroutines] HOME is up on device 'emulator-5554' [2013-09-07 08:02:10 - kettlebellworkoutroutines] Uploading kettlebellworkoutroutines.apk onto device 'emulator-5554' [2013-09-07 08:02:16 - kettlebellworkoutroutines] Installing kettlebellworkoutroutines.apk... [2013-09-07 08:04:31 - kettlebellworkoutroutines] Failed to install kettlebellworkoutroutines.apk on device 'emulator-5554! [2013-09-07 08:04:31 - kettlebellworkoutroutines] (null) [2013-09-07 08:04:31 - kettlebellworkoutroutines] Launch canceled! The emulator also has this message: No compatible targets were found. Do you wish to add a new Android Virtual Devices? [2013-09-07 07:51:58 - kettlebellworkoutroutines] Still no compatible AVDs with target 'Google APIs': Aborting launch. End of the logcat message after I have closed the emulator: 09-06 23:55:31.822: W/PackageManager(68): Code path for pkg : com.kettlebellworkoutroutines changing from /data/app/com.kettlebellworkoutroutines-2.apk to /data/app/com.kettlebellworkoutroutines-1.apk 09-06 23:55:31.842: W/PackageManager(68): Resource path for pkg : com.kettlebellworkoutroutines changing from /data/app/com.kettlebellworkoutroutines-2.apk to /data/app/com.kettlebellworkoutroutines-1.apk 09-06 23:55:31.842: D/PackageManager(68): Services: com.kettlebellworkoutroutines.GCMIntentService 09-06 23:55:31.842: D/PackageManager(68): Receivers: com.google.android.gcm.GCMBroadcastReceiver 09-06 23:55:31.842: D/PackageManager(68): Activities: com.kettlebellworkoutroutines.BT_activity_root com.kettlebellworkoutroutines.BT_activity_base com.kettlebellworkoutroutines.BT_activity_root_tabs com.kettlebellworkoutroutines.BT_screen_customHTML com.kettlebellworkoutroutines.BT_screen_customURL com.kettlebellworkoutroutines.BT_screen_menuListSimple com.kettlebellworkoutroutines.BT_screen_quiz com.kettlebellworkoutroutines.BT_screen_htmlDoc com.google.ads.AdActivity 09-06 23:55:31.842: D/PackageManager(68): Permissions: com.kettlebellworkoutroutines.permission.C2D_MESSAGE 09-06 23:55:32.082: D/dalvikvm(239): GC_FOR_MALLOC freed 7196 objects / 420256 bytes in 113ms 09-06 23:55:32.502: W/Email(239): Line 8: Unexpected end of headers detected. Boundary detected in header or EOF reached. 09-06 23:55:32.532: W/Email(239): Line 8: Body part ended prematurely. Higher level boundary detected or EOF reached. 09-06 23:55:32.562: I/installd(34): move /data/dalvik-cache/data@[email protected]@classes.dex -> /data/dalvik-cache/data@[email protected]@classes.dex 09-06 23:55:32.562: D/PackageManager(68): New package installed in /data/app/com.kettlebellworkoutroutines-1.apk 09-06 23:55:32.582: W/PackageManager(68): Unknown permission android.permission.ADD_SYSTEM_SERVICE in package com.android.phone 09-06 23:55:32.613: W/PackageManager(68): Not granting permission android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS to package com.android.browser (protectionLevel=2 flags=0x1be45) 09-06 23:55:32.622: W/PackageManager(68): Unknown permission com.google.android.gm.permission.WRITE_GMAIL in package com.android.settings 09-06 23:55:32.642: W/PackageManager(68): Unknown permission com.google.android.gm.permission.READ_GMAIL in package com.android.settings 09-06 23:55:32.692: W/PackageManager(68): Unknown permission com.android.providers.im.permission.READ_ONLY in package com.google.android.apps.maps 09-06 23:55:32.692: W/PackageManager(68): Unknown permission com.google.android.pushmessaging.permission.RECEIVE in package com.google.android.apps.maps 09-06 23:55:33.102: W/Email(239): Line 9: Unexpected end of headers detected. Boundary detected in header or EOF reached. 09-06 23:55:33.112: W/Email(239): Line 9: Body part ended prematurely. Higher level boundary detected or EOF reached. 09-06 23:55:33.263: D/dalvikvm(239): GC_FOR_MALLOC freed 3317 objects / 343448 bytes in 106ms 09-06 23:55:33.492: W/Email(239): Line 9: Unexpected end of headers detected. Boundary detected in header or EOF reached. 09-06 23:55:33.512: W/Email(239): Line 9: Body part ended prematurely. Higher level boundary detected or EOF reached. 09-06 23:55:34.092: D/dalvikvm(68): GC_FOR_MALLOC freed 8367 objects / 480416 bytes in 197ms 09-06 23:55:34.282: W/Email(239): Line 9: Unexpected end of headers detected. Boundary detected in header or EOF reached. 09-06 23:55:34.302: W/Email(239): Line 9: Body part ended prematurely. Higher level boundary detected or EOF reached. 09-06 23:55:34.532: I/ActivityManager(68): Force stopping package com.kettlebellworkoutroutines uid=10040 09-06 23:55:34.532: I/ActivityManager(68): Force stopping package com.kettlebellworkoutroutines uid=10040 09-06 23:55:34.662: I/ActivityThread(279): Publishing provider com.android.social: com.android.providers.contacts.SocialProvider 09-06 23:55:34.792: D/dalvikvm(239): GC_FOR_MALLOC freed 2570 objects / 305288 bytes in 353ms 09-06 23:55:34.842: I/ActivityThread(279): Publishing provider applications: com.android.providers.applications.ApplicationsProvider : E/(): Device disconnected: 1 : E/(): Device disconnected
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/06/13 06:30 PM (10 years ago)
Are you online now? We can have a teamviewer session right now if you willing to join. Send me your teamviewer id and pwd to my mail sandeepkurne (at) gmail (dot) com.
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/06/13 06:53 PM (10 years ago)
Hi Sandeep, I will get back to you when I reach home later. I am still working in my office right now. Thank you for offering your help. Greatly appreciated!
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/06/13 06:55 PM (10 years ago)
No problem. Ping me when you get to your house, if i am online that time we can sort out the error together.
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/08/13 12:45 AM (10 years ago)
Greatly Thanks to Sandeep, Thank you for helping me integrating the ads. Everything works perfectly fine. Right now, I am so confused about getting my App APK File. I have gone through the pdf tutorial by GoNorthWest at.... http://www.buzztouch.com/files/howtos/Signing_Android_Apps_v1.0.pdf I don't really understand what it means by ". Debug apps are not allowed in stores if debuggable=”true” is set, it won’t get accepted. And also I have no idea where to find the "android:debuggable="false". This file is said to be located in the root of AndroidManifest.xml file. But I really find it. How am I going to set my AndroidManifest.xml where android:debuggable="true" is to be set to "false" file? Can anyone advice me on this? I have trying to search for answers all day long.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/08/13 01:13 AM (10 years ago)
Nice to know ads are running on ur app. Do you remember that i edited your manifest file?? I removed the android: debuggable="true" and instead of it i put android:allowBackup="true". Allow backup allows the users device to have a backup of the contents of ur app in case he accidentally uninstalls ur app. Now just go and publish ur app by signing it with ur keystore. All the best.
 
CreativeAppsPublis...
Android Fan
Profile
Posts: 63
Reg: Jul 31, 2013
Miri Sarawak
5,030
like
09/08/13 01:46 AM (10 years ago)
Thanks again brother, Do I have to set the android:allowBackup="true" to android:allowBackup="false" in order to release a version of APK file to be submitted to Google Play? I heard people said that Debuggable apps are not allowed in stores, which means if debuggable=”true” is set, it won’t get accepted google play store. Just clarify only... Does that mean I can export an apk file using the default keystore and submit straigt away to Google Play Store? I have done the following steps, 1) Right click on my project - Export 2) Select "Android" - "Export Android Application" 3) Use "Existing Keystore" 4) Key Alias - Use "Existing Key"
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/08/13 04:25 AM (10 years ago)
You dont have to do anything now in the manifest file. All you have to do is just create a new keystore. The default (debug keystore) is not useful for exporting the production apk. For the production apk file you have to create a new keystore. Keystore is very important thing for any developer. Its like your fingerprint so remember the name of your keystore, its alias name and the password. You have to create a keystore only once and then use that keystore to sign all of your apps that you will put on google playstore. So keep this keystore in a safe place also copy the keystore and put it in other different places like google drive, dropbox account or somewhere else so that in case if you delete or loose the keystore you can download the one from google drive and use it again. If you use one keystore to sign up your app, you will need it again in case you update your app. So keep it safe.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/08/13 04:28 AM (10 years ago)
Here is one link on how to sign in your android apps and how to create a keystore. Just dont create multiple keystore for each of your app. You can use same keystore for all apps. So remember the name of keystore, its alias name and password and also keep it in safe place as i said earlier. http://techdroid.kbeanie.com/2010/02/sign-your-android-applications-for.html
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
09/18/13 03:11 AM (10 years ago)
Hi Sandeep, Great tutorial with the Admob Ads. Thanks! One question for you - do the ads display at the top of the screen or the bottom when using this method? John
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
09/18/13 04:42 AM (10 years ago)
@John - the ads will show at the bottom of screen. If you want them to display at top then put the code in step 4 above the webview.
 
Higgey
buzztouch Evangelist
Profile
Posts: 392
Reg: Sep 07, 2011
West Midlands
13,520
like
09/18/13 05:27 AM (10 years ago)
Thanks, Sandeep. You are a star! John.
 
Annonymous
Profile
01/13/14 10:34 AM (10 years ago)
Ahem, is it okay to step in and ask a question? When I went to download the admob sdk Google stated that if using android Google Play the sdk IS already in google play services. There was no zip to download. Of course for earlier versions of android and ios there is the zip. Do I just download that GoogleMobileAdsSdkAndroid.zip and install it? Just want to make sure Im doing this correctly. A tiny bit confusing is all... :)
 

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.