Good evening.
I am currently developing an application and decided to try Admob ads.
Unfortunately after following Admob's guide (pretty simple one, good job on that) I get no ad, whether I run it on the emulator or on my phone (HTC Desire). The weird part is that the ad has shown a couple of times (i really mean just a couple of times), in hundreds of tries. And checking my account on Admob I see that there are 6000 requests from this app.
I started a new applcation, from blank, with no changes.
Any clues?
This is what I have done so far:
Added Adbmo's library jar.
Added these in my manifest (with a proper ID):
<meta-data android:value="axxxxxxxxxxxxxx" android:name="ADMOB_PUBLISHER_ID" />
<uses-permission android:name="android.permission.INTERNET" />
Created a attrs.xml file in res/values with this content:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="com.admob.android.ads.AdView">
<attr name="backgroundColor" format="color" />
<attr name="primaryTextColor" format="color" />
<attr name="secondaryTextColor" format="color" />
<attr name="keywords" format="string" />
<attr name="refreshInterval" format="integer" />
</declare-styleable>
</resources>
Added the following to my layoyt (RelativeLayout):
below RelativeLayout line, with the correct application name instead of xxxx:
xmlns:app="httx://schemas.android.com/apk/res/com.me.xxxx"
and:
<com.admob.android.ads.AdView
android:id="'at'+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
app:backgroundColor="#000000"
apprimaryTextColor="#FFFFFF"
app:secondaryTextColor="#CCCCCC"
/>
As the above did not work I tried the following, but also without success:
AdView example_adview = (AdView) findViewById(R.id.ad);
example_adview.setVisibility(AdView.VISIBLE);
example_adview.requestFreshAd();
I would appreciate if someone could help me.
An off-topic question, when running my application (only this one) in ecplise (Windows), I always the device chooser, even though only my phone is connected and the emulator is not running. It's nothing that disturbs my development, but it's a bit annoying having to choose every time I run the application.
Thank you very much,
Kryex
I think this is caused by low fill rate of admob. If Admob didn't supply any ads for you to display, you got a empty ads.
High fill rate > more ads that are availabe to display.
and each time a user can 'view' ur ads, the fill rate increase.
Yes you don't always see ads because of low fill rate, also in Admob under add categories grown up ads (gambling etc NOT porn) are off by default, I switched those on and got a better fill rate.
Ha this method is good. Let me try on! Thanks for share!
your app needs to be out for atleast a couple of days and have a few hundred downloads at least before ads show up ALMOST every time... (hint: if you enable "age appropriate" ads you'll usually get more ads showing up)
I got my app ready to go, 99% positive I did everything right so...
I used the jarsigner to sign my app as suggested by google and I get the jar verified message but when I try to upload it to the market it says its not properly signed?!
I googled n read n google n read and cannot find the problem or a solution, I've seen people saying its just a bug, restart, reinstall, try again. Or ppl saying its something wrong with the editing of the manifest and even a icon in the apk causing the error...
I've tried everything n I just can't seem to figure it out so I ask for someone familiar with this issue to please help cus my brain is fried!
I also wanna add that zipalign doesn't work for me either, I use a bat file that someone created on here that does it automatically cus when I try n use command prompt it keeps giving a cannot open .zip or can't find error?!
Again, I would really appreciate the help! I got my app, payed my fee n I'm ready to go, I just need help gettin past this. Thx!
Sent from my SPH-D700 using XDA App
Are you using eclipse to write the app? If so, just use Eclipse's "Export" (File->Export) function to do all the work for you.
I used the app inventor and used all the tutorials that are floatin around everywhere. I have eclipse but dont know how to use it cus its more code based and I havent reached that point yet. Even if there was a way to import the apk to Eclipse just do sign it would be great but I dont think it can be done. Its weird cus now I cant even get me apk to recompile after editing the xml file either! I've tried everything manually and fount programs that do it for you with one click and nothing... Its just one headache after another and I cannot figure it out nomatter how much googlin and searching on here I do! Im also starting to think it has something to do with the way the xml file is edited, I've read the tutorials and watched the videos and it seems to be right so if thats the case then I just done know... Im gonna post my xml file so anybody with this knowledge can take a look at it...
I also wanted to add that I am self taught in all this, besides getting help from others to learn so when editing a xml file I just copy, paste, backspace n enter which is what Im guessing Im suppose to do, I match up everything as others have it but Im not sure if iIm suppose to be using different commands or with xml editing things work different... So if thats the case please "school" me on that lol. Thanks!
This is what my .xml looks like...
This is how it comes up on Internet Explorer, when Im in notepad editing it doesnt show the - symbols though, maybe thats my mess up, I dont know cus it doesnt show them in notepad lol. HEADACHES! lol.
<?xml version="1.0" encoding="UTF-8" ?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android">
package="appinventor.ai_djykcor1.LOTF" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-sdk android:minSdkVersion="3" />
- <application android:label="LOTF" android:icon="@drawable/ya">
- <activity android:label="LOTF" android:name=".Screen1">
- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.google.devtools.simple.runtime.components.android.ListPickerActivity" android:configChanges="keyboardHidden|orientation" />
- <activity android:name="com.google.devtools.simple.runtime.components.android.WebViewActivity" android:configChanges="keyboardHidden|orientation">
- <intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
I've never used app-inventor so I can't help you with this. I always just export from eclipse.
Well when I try to import it to Eclipse it gives a error and the xml file cant be read properly or somethin, It has a icon on it that seems to make it look as a error...
com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read C:\android-sdk-windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\android-sdk-windows\AndroidManifest.xml (The system cannot find the file specified)
As a long time programmer, I'll use anything that helps me develop code quickly and easily. And, IMO, Eclipse is the tool.
Creating, testing and deploying your app in Eclipse is great. Signing an app via Export (as mentioned above) takes about 30 seconds.
Google for Android Eclipse Hello World app and it will walk you through doing an app in Eclipse.
Then you can create a new project and copy your code and xml into the project.
I have been learning in eclipse now and I finally got things to go except I keep getting force closes now with my app and Im lost from here... I anybody can help id really appreciate it!
Learn how to log messages, put them in your code to trace its logic and then use logcat to see where the program is abending (old COBOL term for force stopped LOL).
ykman1 said:
I got my app ready to go, 99% positive I did everything right so...
I used the jarsigner to sign my app as suggested by google and I get the jar verified message but when I try to upload it to the market it says its not properly signed?!
I googled n read n google n read and cannot find the problem or a solution, I've seen people saying its just a bug, restart, reinstall, try again. Or ppl saying its something wrong with the editing of the manifest and even a icon in the apk causing the error...
I've tried everything n I just can't seem to figure it out so I ask for someone familiar with this issue to please help cus my brain is fried!
I also wanna add that zipalign doesn't work for me either, I use a bat file that someone created on here that does it automatically cus when I try n use command prompt it keeps giving a cannot open .zip or can't find error?!
Again, I would really appreciate the help! I got my app, payed my fee n I'm ready to go, I just need help gettin past this. Thx!
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
There's Two Apps Available On The Market That Sign Apk's, Zip's, & Jar's
"Zipsigner", & "Signapktic"! I Personally Like "Signapktic", But Both Work!!!
Sent from my HERO200 using XDA App
Well now I got everything good to go but now Im getting force closes so it seems to be a debugging issue that Im tryin to figure out... If any of you can help I'd greatly appreciate it. Shoot me a PM with your # or email, I'm completely lost from here and its SSOOO frustrating cus Im right at the end of the process...
ykman1 said:
Well now I got everything good to go but now Im getting force closes so it seems to be a debugging issue that Im tryin to figure out... If any of you can help I'd greatly appreciate it. Shoot me a PM with your # or email, I'm completely lost from here and its SSOOO frustrating cus Im right at the end of the process...
Click to expand...
Click to collapse
What's the app exactly? I might be able to help.
Debugging can be one of the most frustrating or satisfying jobs as a programmer.
As I said earlier, put Log.v or Toast messages before and after every line of code if you have to. Check the logcat. Comment-out chunks of code until it runs. Un-comment one line at a time till it blows up and you should find your problem and be able to fix it.
Rootstonian said:
Debugging can be one of the most frustrating or satisfying jobs as a programmer.
As I said earlier, put Log.v or Toast messages before and after every line of code if you have to. Check the logcat. Comment-out chunks of code until it runs. Un-comment one line at a time till it blows up and you should find your problem and be able to fix it.
Click to expand...
Click to collapse
Programmers life in a nutshell lol.
Yeah buddy, been there, done that. In college, while taking COBOL, learning to debug an ABEND was a nightmare; no help whatsoever to where it was bombing unless you let it print the 500 green bar pages of the dump . Off topic but...
We had this one room for the advanced class...crappy old IBM terminals, but we had our OWN line printer...which meant we didn't have to go and wait at computer center for our output. This printer was on a table in front of the room and when it fired up, it was soooo loud and actually shook all the tables in the room.
We were all intent on our coding, but sometimes, in the back of our heads, we noticed the printer NOT stopping. Once one of us realized it wasn't a lot of back to back job prints, we knew someone had sent a dump to the printer! The pour soul was summoned to go up and cancel the job, head hung in shame ROFL!!
I appreciate the replies everyone, not sure if I said this before but I'm self taught in all this, learning one step at a time so now that it seems to be a debugging thing ima find the logcat n post it when I get to the lab. Thanks!
Sent from my SPH-D700 using XDA App
Newklearx3 said:
What's the app exactly? I might be able to help.
Click to expand...
Click to collapse
The process is I am making the app in app inventor then importing it to eclipse to edit and make any changes, I am not as advanced to work stricly with code so I use the AI as a base to start the project and I'm learning one step at a time when editing or generating code. Ima be taking a class on this soon once I figure out the best thing to go for... thanks
Sent from my SPH-D700 using XDA App
I am having a problem with my app. my site is already mobile ready so auto fits device.
i have put this mobile ready view into a webview app but for some reason it seems to enlarge the view slightly making my mobile ad to big and popping off the right of the page.
To see what i mean please visit the market and download the autism network app
then visit www.autismnetwork.co.uk form you mobile browser to see how it should look.
is there any way to get it to look the same as in the mobile browser this is my main xml
<?xml version="1.0" encoding="utf-8"?>
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/WebView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="none"
/>
hello friends,
i have developed an application after a long time and i was integrating an admob ad into it, i found that now we have to use google play services lib to use admob ads in app.I have set up the 'google play services lib' in my project and doing everything as stated on developers.google.com but still ads are not showing up..
here is my code
**XML**
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
androidrientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.gms.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId=" a153207********"
ads:adSize="BANNER"
/>
<WebView
android:id="@+id/webView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>
**************
and i am using these lines in java code to show the ad
AdView adView = (AdView)this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice("TEST_DEVICE_ID")
.build();
adView.loadAd(adRequest);
but still no ads are being shown..in my admob dashboard also it is showing that "red button" i.e it has not received any ad request.
what to do?..pls help..
thanks..
Hello,
i have the same problem have solved you? How?
Thanks.
Admob inventory
This could be related to Admob inventory is empty during the test wait and test again
Ok so i wanted to program a launcher. But the code to do this is soooo far beyond me its not funny. I understand programming well. and i made a fair bit back in the days of actionscript. However i need help understanding code for a basic launcher where you can display apps on a screen.
I want to eventually be able to make a launcher that has no pages. But is one big giant open world Like environment. Surprisingly ive tried to pay people to do this for me and still couldnt find anyone. Really getting the base code should be the hard part. Once i can understand the code well enough i dont think i will be able to manage that but it would cool if i understood it and was capable of it.
All help is appriecated.
No replies....
scorpafied said:
No replies....
Click to expand...
Click to collapse
To make an app respond to the home screen button press, you'll need to add an intent filter with your Activity tag in the manifest like so:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Launchers are like any other apps. Usually they query the system for activities that can be launched, like this:
final Intent allAppsIntent = new Intent(Intent.ACTION_MAIN, null);
allAppsIntent.addCategory(Intent.CATEGORY_LAUNCHER);
final List<ResolveInfo> packageList = getPackageManager().queryIntentActivities(allAppsIntent, 0);
You'll probably save your icons however they're laid out in a SQLite database, and then host widgets in various views (a good tutorial is here). You might also want to look at the Launcher2 source code, although it's pretty confusing. Good luck.
I tried the link u provided and it went to a page that said "there is no such post. ". im still learning java so i will definitely check out the source code but it may take a fair bit of time before i understand it.
also i know launchers are like any other app. But its the code behind how you will navigate around for the launcher im gonna have problems with.
Thanks for the advise though.