GWT AdsManager not displaying ads on map - java

Here's my code:
AdsManagerOptions options = AdsManagerOptions.newInstance();
options.setMaxAdsOnMap(1);
AdsManager ads = AdsManager.newInstance(map, "google");
ads.setEnabled(true);
I tried doing this before the map is added to a panel, after a map is added to a panel, and any other way i could think of that could possibly make sense. My publisher id is "google" because I havent been approved for adsense yet, but ive tried taking a real publisher id and i got the same result.
What is confusing me a bit, is that the AdsManager isnt a widget, so I cant choose where i want to place it on the map. Ive read that this is actually how it works, but ive seen sites like http://mapper.acme.com/ where the ads are not in the typical bottom right corner.
Can someone PLEASE enlighten me on what I am doing wrong because this is driving me mad! Thanks!
I still have no answer. I am now trying with a legitimate publisher ID so I know that an invalid publisher id wasnt the reason for my frustrations. Anyone have any ideas?

Are you using firefox? If yes, do you have adblock on? Or any other adblocker on your browser?
Its also possible that the region you're looking at doesn't have any ads... Try zooming into a place like New York...

Related

how do I attach a description to an imagen in android studio?

first of all I want to thank, because in this community I have found a lot of solutions to my development question. But this time I have a big one. I was looking for an answer to it in google and pdf´s and so on. But it's a complicated question and don't know how exactly ask for it in google. I new in app development. so here I go. I'm trying to do an app that shows the different recipes with photos and description like time that it takes and the difficulty and so.
explanation of the question
Apologize because the childish imagen to explain to you but you know (efficiency).
My two questions are:
1) How may I do to attach a description to an image. I mean, I want that the people can add their own recipes and of course I will make a formulary to this, but how may I do to when the people create the recipe that I suppose that it should be an object of a class, the TextView be attached to the bottom of the image automatically. in resume, that the image and the description with their elements be one unique element. I have tried to encapsulate the image and the text view in one layout, but in this case I don't know how to create a new layout once the app is running. ok the user fill the formulary but how to create a new layout on the run. I don't know how to solve this.
2) How may I do to change in the description of the image the quantity of red tomatoes. I mean. if the recipe have 3 in difficulty, 3 of 5, this is settled by the user, but how I do to show 3 red tomatoes of 5 and the other showed in gray?
I know you may say "another Newby" but I have realized that I love programming and in El Salvador (Central America) there´s almost any information about this subject. Again, thanks a lot.
one way to achieve that is by using Recycler view. and every time a user adds an item. you can add it to the list and the system will draw a new item for you.
check this tutorial
let me know if this helps or you need more explanation

Make progressbar with multiple circles

Before the question was flagged as being asked before. I've searched for days and still cant find something that looks like this. I'm able to make a single circle progress bar and change the color but I cant seem to make one with multiple circles like seen below.
Been searching for a way to make multiple lines like that with xml but couldn't find any.
This is a third party library. You can directly use it or just study the code of it. You will get some idea by that. https://github.com/generic-leo/SimpleArcLoader
If the ans solved your problem Mark this as accepted.

Why can't set the random color?

Description
Tool:
Android 4.2+, Jelly Bean, API level 17
I started android programming a couple of hours ago and I can set a random text, but the color don't changing (text and background, too). I use the same logic, what was right at the text modifying, but something went wrong.
Activity content
ColorWheel content
Okay, I tested on an AVD device, and it's working! I don't understand this.... my phone will be crash or stupid?? (I really care the correct API level, so I don't know what's the problem..)
But the point is the code is right.
Thanks for helping!
P.S.: next time i will use the code, not the picture.

Using java Robot class

I want to write an address in the address bar of a browser as well as click on a link using java Robot class. How can I track the different objects in a certain window?
Just giving a look at the API http://docs.oracle.com/javase/7/docs/api/java/awt/Robot.html, anyone who do this should know that via Robot Class there is no "trackComponent(Component specificComponent)" method, you got 2 things that may help you:
1-getPixelColor (more than help, seems useless for you by now, maybe i'm wrong).
2-createScreenCapture.
the second method is maybe the answer for your problem, you could take a picture of the screen and with some image processor (javaCV could help you on this: https://code.google.com/p/javacv/) you could then track the components on the screen you took (for instance: from pixels xxx to pixels yyy is the Address bar of browser), of course you need to read some documentation about javaCV (OpenCV) for get this done, after that just use the method for move cursor and enter keys for fill the components, hope someone give a simpler way to do this, but i think this way you learn a bit of JavaCV a really powerful tool.

User-arrangeable Android GridView

So here's the thing, I want to build a GridView containing few items that are movable/rearrangeable by the user. Pretty much similiar as the one you'd see on the home screen of Android.
I've looked into some places but ended up with zero result. The closest thing I was able to find was the sample of a home screen app found on developers.android.com but It doesn't have the thing I'm looking for (the items are unarrangeable).
Please give me a hint how this could be done. Code examples are also welcome.
Thanks in advance! :)
I think you should implement a drag&drop.
The GridView can handle the OnDragListener, so you could do : myGridView.setOnDragListener and do whatever you want with it.
I also advise you to check the following link
I hope it helped!

Categories

Resources