I have a Google Map activity.
when i run it on Api16 emulator, everything looks fine it shows me the map.
But when i run it on Api23 emulator, it shows me a blank screen whith a google logo.
What's the problem?
We really have to see the code to know what the problem is, but it might be a depreciated api. For instance the .getmap has been replaced with getMapAsynce, but you cant just change that word to fix it. read this:
Replace getMap with getMapAsync
Related
I just started using Java, seems pretty straight forward. When I make a gps app with google maps on an android device there's no issue. However, I tried to incorporate an android wear device (Currently running on a simulator). My dismiss overlay pops up after a long click, but the map comes up blank. I'm getting the map and it's not null so I know it's there. I'm thinking I need to use the handheld location listeners but I'n not exactly sure how to point them towards each other. If someone could point me in the right direction I would appreciate it.
-WD
You need to have the google maps api key setup on your android app. You then need to make sure that the package name in the android manifest files are the same. This is the part that hung me up for a while. Once you do that, you should see the map render.
Never messed with custom layout in Android.
What I'm basically trying to do is this:
The closest thing I've found is this, but didn't manage to make it work (tried for few hours and no result, it just won't show), and also it would require more work to make it look like the facebook's one.
I'd like to be able to call the toast everywhere from my app, too.
Thanks ahead.
I just started programming android apps with eclipse..
I try to follow this guide: http://developer.android.com/training/basics/firstapp/building-ui.html
but I can't get further than here..
When I run my app through my htc phone, it just shows an empty app....
Then I tried creating a totally new android application in eclipse, and as a standard, there is an app with a text writing "Hello world"..
And when I show my activity_main.xml in graphical layout, it shows an app with this text "hello world".... but still, when I run it through my htc, I still just get an empty app...
How can this be, what am I missing?
Thanks.
Edit: actually, the app on the phone is not totally empty... it does show the standard head-banner with the android logo and the name of my app. But no textview...
First close the version of application that is already running on the HTC device. OR best thing woulld be uninstall it and try again.
It should work
Also, set the content view
setContView(R.layout.your XML file name);
Your activity does not add any content to the window so therefore nothing is shown.
Seems like you already have the wizard-generated layouts in res/layout. Just add
setContentView(R.layout.activity_main);
to onCreate() where activity_main corresponds to res/layout/activity_main.xml and that layout file actually contains the UI you want displayed.
Also import your generated resource identifiers:
import com.example.nytapp.R;
You will also need to call the superclass onCreate() in your onCreate(). Add
super.onCreate(savedInstanceState);
as the first line in your onCreate().
The warning
ActivityManager: Warning: Activity not started, its current task has been brought to the front
is nothing to worry about - if you didn't change your code and try to run it, the app won't get reinstalled and launched but just an existing instance is brought to front.
I'm trying to put Admob for android app in studio and then publish it on google play.
I have read that soon, google requires a very specific way of displaying banner.
I wonder if this form is correct and incidentally try to fix the bug that gives me.
The mobile works perfect, but not that get the error on android studio.
I put a picture to make it easier to find the error.
Hope you can help me, Thanks.
enter link description here
The error you are getting is from an old version of Admob (6.4.1), and is only an error when trying to render the AdView within your editor, it is not a runtime error.
Try using the new Admob SDK (the one from Google Play Services). It is much more likely to have this (editor only) bug fixed.
I'm testing out a library file I've created (a jar file) . And inside this library, I use an asynctask. I mainly test it with a motorola Atrix 2.3.6. However i've also tested it with a samsung nexus S and a Galaxy tablet, and everything works perfectly.
However, I've tried it on a Xperia 2.3.7 and when I'm debugging I get into the PreExecute() of my Asynctask, but it never even enters the doInBackground(). HOWEVER, I have a second asynctask that is inside of the main activity. (Not from a jar). And that seams to work ok on the Xperia.
There are no error logs, as there are no errors reported, it just simply never gets there.
Something to note, is that this is a rooted phone that has some parts swapped in from another phone. Which might have something to do with it.. But I don't see how.
Any ideas?
I sort of figured out the issue. For some reason the code was just never able to break point.. No idea why. However the code was still being executed, so I was able to move forward. The phone actually had some further compatibility issues which caused the other problems I was seeing which prompted my question.