Admob problem - Android Software Development

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)

Related

[Q] Market Preperation

I have read alot of things that show only a zillion forms of code you must put into your app for the market and it's filters.
Here is what I have;
<uses-feature android:name="android.hardware.touchscreen" android:required="true"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="false"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
Is there anything else like the <user-config> tags etc that are required/needed ?
Thanks
I found and added this to my manifest, just above the </manifest>
<uses-sdk android:minSdkVersion="7" />
Anything else I should add?
Still needing some advice on this. I'm sure other new comers will also.
I have looked all over and a guy/gal could go nuts trying to figure this out without a hint.
Anyone with a clue wanna' share some info?
Ok, since nobody out there wanted to help, it took me this long to figure it out.
Oh yeah, and I will be nice and post my findings since all you info-greed-mongers did not want to share.
Here is a typical, and yes, market acceptable manifest if you get one of those silly errors about a 32-bit Integer blah blah...or of you get and error about your icon not being 48x48.png..blah blah.
This fixed all my errors from Google submission process. I of course added the user define tags for things the app needs, like a touch screen, etc.
<><><><><><><><><><><><><><><><><><><><><><><><>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.yourapp" android:versionCode="1" android:versionName="1.0.0">
<application android:icon="@drawable/icon" android:label="@string/yourapp" android:theme="@android:style/Theme.NoTitleBar">
<activity android:name=".yourapp" android:label="@string/yourapp" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="6" />
</manifest>
<><><><><><><><><><><><><><><><><><><><><><><><>
Hope that helps some of you folks out there
Merry Christmas
"Info Greedy Mongers?" That's a bit harsh considering there are only 3, well 4, requirements to publish app:
1. Sign-up for account
2. "Sign" your app
3. Need versionCode and versionName in manifest
4. Need android:icon and android:label in manifest
This information can be found quickly with a Google search on "Publish Android App"...About 8,490,000 results (0.36 seconds)

problem with android layout in webview

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"
/>

admob not recieving ad request

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

[Q] launcher navigation

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.

Disabling pdf file from Nook simple touch(glowlight) Library app

Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get rid of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
All Credit to @Renate NST ... for successfully accomplishing this idea to lighten up the default library app in our NST&G's ... to anybody who is interested in this ... can follow the steps found HERE
thanks for looking.
aiamuzz said:
Hello,
The default 'Library' app on a NST & NST(G) ... is equipped to read pdf and epub files by default and list them out inside it.
As we already know the pdf files are not viewed best in the device's default reader app. The default library launches a pdf book into the default reader app.
I would like to know if somehow we can disable the library app from populating(picking-up) pdf files/books inside its library. This way i hope to get read of pdf book entries from my default library.
is there some setting file for the default library app where we can uncheck pdf file format from its compatibility list ?
wouldn't it be nice to have a library full of only epub books ? would surely make our default library sparkling clean.
thanks for looking.
Click to expand...
Click to collapse
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.
nmyshkin said:
Not entirely sure about the Glowlight interface, but on the Library screen for the NST there is a drop-down menu option for displaying "all" or "books" or "shelves", etc. If you choose either "books" or "shelves" you will not see PDF files (unless you've included them in a shelf). That may be the easiest thing to do.
Installing a dedicated PDF reader will still give you access to any PDFs you may have via that app's user interface.
Click to expand...
Click to collapse
@nmyshkin ... good work man ... you've kept our dinosaur of a device alive by your participation and chatter(enthusiasm) ... the community owes you among ... the many others who have from time to time kept the activity around our devices alive this far.
Yeah i am aware of the "all", "books" or "shelves" categorizations ... currently i use the shelves to minimize the cluttered library with the pdf's littered around without much use there as the nook reader is not the best reader for pdf's.
The reason i hope the PDF's do not show up even in the "All" category is because i have a lot of PDF's on my memory card, they all get populated in the default library app and unnecessarily increase the painful number of pages one has to flip through to get to a particular epub ebook burried under it.
If this could be achieved then ... preferred app per format would be ...
mobi format : Kindle
epub format : nook reader (without the clutter of the PDF files in its library)
pdf format :
ebookdroid - for a clean page flip reading experience of a fixed width PDF layout.
AVP pdf reader - for a magazine(multi-column) layout
... where double tapping a particular column in both, zooms in on the content to a readable size.
just hoping the PDF format could be unchecked from the default library app all together.
PS : i remember having the 'reboot' and 'recovery' options besides the 'power off' option before i reconfigured my NSTG lately, i just forgot how to enable the same back, Would appreciate if somebody could jog my memory on how to re-enable it back.
Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?
There are two different things here:
The first is the preferred activity for .pdf (or .epub or anything).
That's a question of whether you have another app to support it and whether you selected it in the picker.
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
In the latest Nook (Glow3), you could modify com.nook.scanner.ScannerService.isNookSupported() to report false for pdf.
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Renate NST said:
There are two different things here:
The second thing is whether the Nook library notices and records .pdf items.
It's been a long time since I used any of the stock Nook library or reader.
In the NST, you could modify com.bn.nook.util.ReaderUtils.isSupportedFormat() to report false for pdf.
I believe that you would have to resign your whole system as the old Nook used sharedIds instead of priv-app
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
thanks @Renate NST ...
Yup i am looking at the second option where the library does not notice pdf files ...
will reporting 'com.bn.nook.util.ReaderUtils.isSupportedFormat()' as false, render the library unable to record pdf files ?
If so ... a noob instruction set ... on how one could go about reporting the ...isSupportFormat to false ?
and about hacking the database to delete all the pdf's ... we will have carry out the deleting exercise everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
look forward to the sought instruction set to report supported format as false ...
thanks.
nmyshkin said:
Power menu mod: https://forum.xda-developers.com/showthread.php?t=2171818
Can you tell me the version number for AVP PDF reader?
Click to expand...
Click to collapse
thanks for the link ... @nmyshkin ...
I am using version 2 versions ...
APV PDF Viewer 0.4.1.0 (41001)
found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?
aiamuzz said:
found the following entries in 'LibraryPreferences.xml'
Code:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="view_type_2" value="4" />
<int name="view_type_0" value="0" />
<int name="media_type" value="5" />
<int name="sort_type_4" value="0" />
<int name="sort_type_5" value="0" />
<int name="view_type_7" value="0" />
<int name="view_type_5" value="0" />
<int name="view_type_4" value="2" />
</map>
any values to be modified here to disable PDF file type ?
Click to expand...
Click to collapse
My guess is no. The values in my file are slightly different and I'd hazard a guess that these apply to the current state of the drop-down menus in the library.
aiamuzz said:
... everytime one adds new pdf files or reboots the nook ... that would be cumbersome.
Click to expand...
Click to collapse
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.
Renate NST said:
No, a trigger would act on the insert automatically and delete or disable it immediately.
The other approach to modify the code, try using apktool.
I know that it's a bit cumbersome to rebuild apk's, but you might find it a useful skill to learn.
Code:
apktool d whatever.apk
<modify something>
apktool b whatever.apk
<sign using jarsigner and your signature>
Unfortunately, you have an NST which requires resigning *everything*.
Click to expand...
Click to collapse
hmmmm ... looks way above my pay grade currently ... reverse engineering an apk that is !!!
PS : I have decompiled the library app and extracted the java source codes ... i tried to read the smali files and java files ... shortlisted two files that could possibly hold the key to accomplish the desired functionality ... but that's about it ... i currently do not possess the skill to modify and rebuild the Library apk. I can post the smali files if anybody wants to help modify the relevant parts of code.
Renate NST said:
There are two different things here:
'
'
'
You could also just hack the database to delete all the pdfs.
An After Insert Trigger would do the job.
Unfortunately, I have no populated B&N databases to demonstrate this.
Click to expand...
Click to collapse
Could a more detail instruction on how to attempt the database hack ... possible ?
thanks
Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.
Renate NST said:
Well, let's try an easy test first.
I fired up my old NST to take a look.
I don't have the B&N reader or library on it, so I don't know if this will do the job.
Try this:
Code:
# cd /data/data/com.bn.nook.reader.activities/databases
# ls
...
readerlocal.db
...
# sqlite3 readerlocal.db
sqlite> select ean from readerlocal where ean like '%.pdf';
... <bunches of pdf files>
sqlite> delete from readerlocal where ean like '%.pdf';
sqlite> .q
#
Then do a restart and see if the stuff is missing from the library and how long it takes B&N to put it all back.
If this clears it out of the library, fine, we can work on the automatic trigger.
Click to expand...
Click to collapse
This seemed to be working at the time of execution (although there is no feedback when files are "deleted"?), but it did not list all PDF files. I recently downloaded a copy of the newspaper in PDF form and that is in the Library. This was not listed by sqlite. Instead, long gone items were listed.
In any case, when I exited and rebooted, the newspaper was still in the Library (or "back"). When I was writing the book cover "screensaver" app, there was another db besides readerlocal which seemed to contain similar info but I've forgotten what it was.
nmyshkin said:
Instead, long gone items were listed.
Click to expand...
Click to collapse
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#
Renate NST said:
Well, then it's just using the regular MediaScanner.
If you hack that then a PDF viewer that relies on it may not enumerate PDF's.
Of course you can still select a PDF in a file manager and open it in your viewer.
As I said, I have neither a B&N Reader nor B&N assets on any of my devices.
Ok, try this one:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> select _data from docs;
...
sqlite> select _data from docs where _data like '%.pdf';
...
sqlite> update docs set valid=0 where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
OK, so this listed the entire library contents, including the one current PDF file. I guess it also accepted the final command (no feedback), but when I rebooted, the PDF was still (or back) in the Library. I also checked the Library just before rebooting and the PDF was still there.
nmyshkin said:
... the PDF was still there.
Click to expand...
Click to collapse
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#
Renate NST said:
Yeah, I was just trying to see if the B&N stuff paid attention to the "valid" column, apparently not.
OTOH, if you only have one PDF, why is this such an issue???
Click to expand...
Click to collapse
LOL, actually, I'm not the OP! But I was curious to see if such a manipulation was possible. I still think it is simplest to just choose the display "Books" or "Shelves" in the Library. That way you don't see PDFs unless you specifically put them on a shelf. Meanwhile your dedicated PDF app can be directed to the PDF files.
Renate NST said:
Code:
# cd /data/data/com.android.providers.media/databases
# sqlite3 internal.db
sqlite> delete from docs where _data like '%.pdf';
sqlite> .q
#
Click to expand...
Click to collapse
This instruction removes the PDF file from the Library immediately, or as fast as I can get there after closing the terminal window.
The PDF file reappears in the Library on reboot, as you might expect. Like I said, I think it's just simpler to choose a Library display option that excludes PDF files. Something by Emerson regarding a foolish consistency
nmyshkin said:
Something by Emerson regarding a foolish consistency
Click to expand...
Click to collapse
Well, the (artifical) constraints on this were to do it without modifying the apk.
Code:
CREATE TRIGGER no_pdfs AFTER INSERT ON docs BEGIN DELETE FROM docs WHERE _data LIKE '%.pdf'; END;
That's it, put it in your database.

Categories

Resources