Android Development-cannot download an image outside of onCreate

Posted by murad on Stack Overflow See other posts from Stack Overflow or by murad
Published on 2010-05-18T06:58:34Z Indexed on 2010/05/18 7:00 UTC
Read the original article Hit count: 230

Filed under:
|

hi everyone...... im new to android development........and i am stuck with a problem...... i am trying to develop an android application that shows the user the location of atms,hotels etc on a google map....i havent started working on the gps yet.as of now the app works something like this....first of all a map loads on which i intend to show the users current location......on clicking on the menu button there are 3 options..... -services -about us -quit on selecting services option the following options are available...... -atm -hospital -hotel etc on selecting the atm option we will be shown a screen displaying some text........ on using the menu for this screen we get the following menu items..... -sbi -canara -hdfc -icici etc my intention is that when the user selects the sbi option a map should load showing the various places where there are sbi atms near where the user is currently......

......i started out with the google map api but i had to quit because when i select one of the menu options, such as "sbi",the map doesnt load......instead i am getting the error "application failed to load"...basically i was trying to load a map activity from my first map activity......after googling a bit without any results i tried another approach.......i tried to download and view the static map of the location i wanted..it worked.......but when i tried to download the static map when i select an option like before i get the same error..."application failed to load"...then i tried downloading 2 images from inside onCreate....that worked.......i cannot do the same thing outside the onCreate.....for eg.inside the function for the selected option... i have given the link to my code below.....

if someone can please look into this it would be of great help to me.........i have been sitting with this problem for days now......and its urgent too.......i have done the project in eclipse.......

httpDownload.java --- http://dpaste.com/195981/

© Stack Overflow or respective owner

Related posts about android

Related posts about google-maps