Request for help and urgent reply..

Put your problem here if it does not fit any of the other categories.

Request for help and urgent reply..

Postby tv_sathish » Tue Apr 01, 2008 1:38 pm

Hi Plusminus and others,
I am trying to get at least a minimal app ready and even in that I am facing problems. So can anyone help?

1. In the DrivingDirections project(Google Driving Directions - MapView overlayed), I am not seeing driving directions as the following snippet returns the same map co-ordinates always. I tried to figure out how it calculates but not able to figure out why it would return same coordinates always (I made no changes to the file downloaded from forum). Can somebody help why this is happening?

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.                                         if (current != null) {
  2.  
  3.                                                 MapPointToScreenCoords(current, screenCoords,
  4.  
  5.                                                                 pixelCalculator);
  6.  
  7.                                                 /* Add point to path. */
  8.  
  9.                                                 thePath.lineTo(screenCoords[0], screenCoords[1]);
  10.  
  11.                                         }
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


2. Is it possible to start one activity during the onCreate of another and then show two differet screens on either of them and be able to switch between the two? This is very crucial for my app, so if anyone has an idea on how to do this, please help. Can the onResume method be somehow called to resume one activity after another is done with? Even if I use single activity and multiple screens (setContentView(...)), is it possible to "go back" to old screen and show it the same way it was before the switch to another screen? i hope I am not confusing. This seems to be possible, because the Apps launcher from main window shows your activity in whatever last state it was - I am not able to figure out how it does that so that I can do the same?

Thanks and regards,
TVP
tv_sathish
Developer
Developer
 
Posts: 29
Joined: Wed Jan 09, 2008 12:32 pm

Top

Postby Jesmiatka » Tue Apr 01, 2008 2:59 pm

I do not know about .1 but I think that you are completely wrong about .2

(I can't say the following points are facts, but I reckon it works this way)
Home will be launched over your intent, which means the intent you used in your application does not get the function "finish()" called. If finish() is not called, the information and state of the intent will be saved by Android. "Relaunching" the activity by using the icon in home just brings your intent back to the front in stead of the Home intent.

I think you can save information if you just put the values in vars (would be easily possible since you will only use 1 class for those 2 screens)
Jesmiatka
Senior Developer
Senior Developer
 
Posts: 164
Joined: Mon Feb 04, 2008 3:37 pm
Location: Netherlands

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 26 guests