Android :: Start Activity From Overlay In Maps

Jul 22, 2010

I am trying to create a map application and I need to do something similar to what Google Maps does. I want to open show a list of locations and when user taps on them I want to show a dialog.

I was able to do it till here. But now when the user clicks on the dialog that opened I want to show another acttivity with the details of that item that they clicked on.

I tried to start a new intent but it gives me an error.

Here is what I am doing

CODE:...................

Here is the stack trace E/AndroidRuntime( 4985): java.lang.RuntimeException:

Unable to start activity ComponentInfo{com.achie.test.mapssample/ com.achie.test.mapssample.ItemDetailView}:

CODE:........

Why am I getting this error and how can I resolve this and open a new activity?

Also where can I find the source code for the google maps on android?

Android :: start activity from overlay in maps


Android :: Detecting Clicks On A Google Maps Overlay

Jun 15, 2009

I would like to put a bunch of dots on a google map, and have the appropriate listener called when one of them gets clicked.All i seem to be able to find is to get the location at which the click occurred, and then iterate through the dots until I find one that I think matches. Is there no listener for an arbitrary shape, like a drawable? I feel like this might be a Java question more so than android, but hopefully someone can still answer it.

View 3 Replies View Related

Android :: Phone Maps Support Ground Overlay?

Jun 8, 2010

I have a weather image I would like to use as an overlay in the google maps android api. I would like to achieve the same result that I get from using GroundOverlay in KML files, such as

<GroundOverlay>
<name>myimage</name>
<Icon>
<href>myimage.png</href>
<viewBoundScale>0.75</viewBoundScale>
</Icon>
<LatLonBox>
<north>75.6088</north>
<south>5.0121</south>
<east>182.2805</east>
<west>120.6795</west>
</LatLonBox>
/GroundOverlay>

The above will ensure that the 4 corners of my image stay anchored to the 4 lat/long points listed, regardless of scrolling, zooming etc. Is there a way to accomplish this using the google api / maps provided for android?

View 1 Replies View Related

Android :: Expanding Overlay Marker On Google Maps?

Jul 20, 2010

I can draw overlay items onto google maps just fine, an image that looks like:
_____
| |
______
/

Where the "/" part is the "pin" that marks the lat/lon on the map and a picture in the middle of it. My question is, is there any way to expand this when the user clicks on it? I'll of course have to change this to some kind of dialog or layout and change it when it gets clicked.

I want to have it smaller like that with just an image when not clicked on, but when it is clicked on it expands over like a second to:

--------------------------------------
| <image> <buttons> |
| <buttons> |
| <some info here> |
| |
--------------------------------------
/

Is this possible?

View 2 Replies View Related

Android :: Adding Items To Maps Overlay Does Not Immediately Show On Map

Aug 28, 2010

I can't figure out how to tell my Map to redraw its overlays once I've updated them. Currently the user has to touch the screen before the map is redrawn.

View 2 Replies View Related

Android :: Threading - Custom Google Maps Tile Overlay

Nov 4, 2010

I've been stuck for ages now trying to implement threading or background image loading for a custom tile overlay class I've been working on. I'm pretty useless when it comes to Java so threading isn't something I've had any experience with. Basically I have extended an ItemizedOverlay and in the draw() method calculate the tiles I need to display over the standard google tiles then fetch those images with a URLConnection and using BitmapFactory decode them and draw them to the canvas at the correct position on the screen so that the images are on top of the google tiles with about 50% opacity (the custom tiles are cellphone network coverage png's which are used for our web app). I initially got this all working with the tiles loading in the correct places but hit issues with memory and "freezing" while panning so implemented some basic caching and memory management to only store the tiles that are displayed on the map in memory and when downloading a tile store it to SD card.

Then I figured the freezing while panning is due to the blocking nature of downloading the images so, have been trying to implement threading. I created a class that extends AsyncTask to download the images in the background and store them to SD, in the onPostExecute method I then try to draw all the tiles. But onPostExecute never seems to fire, now I know that the AsyncTask has to be called in the main ui thread so tried to debug the execution with Thread.currentThread().getId() calls through out the code. The thread Ids through out is 1 and then 10 for the doInBackground method for the AsyncTask. Now I'm not sure if 1 is the main UI thread or not. In the extended MapActivity class I have, the onCreate method's Thread.currentThread().getId() returns 1 but I'm not sure if the MapActivity class is executed in the main ui thread? Here Romain Guy mentions that the onPostExecute method should have @Override but when I do that eclipse flags it as an error

"The method onPostExecute(Boolean...) of type TileCache.ImageLoadTask must override or implement a supertype method"
So I guess something is wrong there but the only fix eclipse offers is to remove the @Override
So I guess with out post all my source code, the question's I have are:
Is the MapActivity onCreate method called in the main ui thread?
What does the @Override error mean? or why does it show that error
Does anyone have an example of a custom tile overlay implementation with background image loading and tile caching?

View 1 Replies View Related

Android :: Not Understanding DrawAt() Method For Com.google .maps.Overlay

Jan 19, 2010

Trying to make an google maps overlay in an android program. Inside of my overlay's draw method, I have two ways of adding a pin. One of them works, and one does not. Unfortunately, the one that does not work is also the only one that has the ability to add a shadow!

CODE:...........................

View 2 Replies View Related

Android : Location/maps - Speed - Delete Overlay Without Deleting All The Others

Oct 26, 2010

I'm messing around with maps and gps and i have some questions. Hope any of you point me in the right direction:

- I´m loading about 400 overlays in a mapview, but it takes 2-3 minutes. Is there any way to speed things up?

- On the other hand, I use another overlay to point device gps position, but when location point change i need to delete this overlay to put it again in it's new position. How can i delete this overlay without deleting all the others?

View 15 Replies View Related

Motorola Droid :: Overlay A Route In Google Maps?

Feb 5, 2010

I am looking for a way to overlay a route in google maps.

What I want is to take this map Greenways Oak Ridge Google map and get it to my google My Maps. Then I can pull it up in Maps and use my location to see where I am in relation to where I need to be in case I want to take a different route to need to shorted the ride due to darkness.

Most rides I do I can find these maps but cant do anything with them.

View 13 Replies View Related

Android :: Activity As Overlay Over Other App

Sep 23, 2009

Is it possible to create an Android activity as an overlay above other application? If yes, please provide me a pointer.

View 7 Replies View Related

Android :: Launching Activity From Overlay OnTap

Feb 10, 2009

I am wondering if I am going about this problem the correct way.I am making an app that places overlays on top of google maps.When you click on the overlay it should launch a dialog type window that will give you options on what to do with that overlay.It is the line startActivity where the app throws an exception.I did the setFlags because an error message said it was needed because I was trying to start the Activity while outside an Activity.That makes me think I am going about this wrong.I have 'MyActivity' listed in my manifest so I don't think that is the issue.I have searched for this problem on the internet and I can't seem to find anyone else running into this so that is another reason I think I may be trying to do this the wrong way.

View 3 Replies View Related

Android :: Starting Activity In Overlay OnTap?

Feb 10, 2009

I am attempting to launch a dialog type window when I click an Overlay that has been placed on google maps. I thought the way I would do this was Override the onTap() method, create an intent, and call startActivity on that intent as follows:

CODE:..........

It looks like the program throws an ActivityNotFoundException when executing that last line. The exception reads that if you try to start an Activity while you are not in an Activity you need to set the FLAG_ACTIVITY_NEW_TASK flag which is why that line is there. I have included MyActivity in my manifest.

'context' is passed to my class constructor that extends Overlay and is the MapActivity that I am using to display the map.

View 2 Replies View Related

Android :: Opening Another Activity From The Map Overlay Dialogs

Jul 22, 2010

I am trying to create a map application and I need to do something similar to what Google Maps does. I want to open show a list of locations and when user taps on them I want to show a dialog.

I was able to do it till here. But now when the user clicks on the dialog that opened I want to show another acttivity with the details of that item that they clicked on.

I tried to start a new intent but it gives me an error.

Here is what I am doing

CODE:..................

Here is the stack trace

CODE:........

Why am I getting this error and how can I resolve this and open a new activity? Also where can I find the source code for the google maps on android?

View 1 Replies View Related

Android :: Android Maps Overlay OnTap Click

May 5, 2010

Could anyone help me with my below program. I'm unable to put a transparent label containing the contents from my HelloGoogleMaps.java class (Hola, Mundo!) when i click the markers(the android icon) in the map. I would like to have the ontap event do it for different markers here so that that particular location details is popped up. It needs to be in a canvas display. Upon clicking this new canvas label, it should take me to a seperate activity displaying complete details. I'm using the sample program given in the Google Android Website http://developer.android.com/resources/tutorials/views/hello-mapview and i want to extended it to the next level. Import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import com.google.android.maps.Overlay; import com.google.android.maps.OverlayItem; import android.app.Activity; import android.graphics.drawable.Drawable; import android.os.Bundle;

View 2 Replies View Related

Android :: Start An Activity And Return Back To Original Activity

Jan 26, 2009

I have an application with contains multiple activities. The main activity will start the others ( use startActivity() ) depends on user event, when an activity close, it calls finish() and return back to main activity. It appears to behavior like that.

However, the "problem" I see is main activity's onCreate function is called every time. I think the the main activity should be placed in the activity stack and simply push to front when others exit, therefore only onResume, onStart are called. Is there some flag I need to set or I misunderstand the activity behaviro?

In child activity, besides calling finish() or startActivity for main activity, what is other way to move main activity to front?

View 2 Replies View Related

Android :: Start Activity When Main Activity Is Running In Background

Jan 10, 2010

I created an application which enables the user to set whether he wants to receive notification while the application runs in background mode. If the notifications are enabled an activity should be started (the dialog should appear on the screen).

I tried to enabled it the following way:

CODE:...........

This is the method from main activity. When onPause() is executed isRunningInBackground is set true.
When I tried to debug it when the main application was running in the background the line

startActivity(intent) had no effect (the activity didn't appear).

Does anyone know how to midify the logic in order to start an activity from the main activity when the main activity is running in the background (after onPause() is called)?

View 1 Replies View Related

Android :: Start An Activity In Different Apk Using StartActivity - Using The Activity Name Or Similar

Apr 20, 2010

I have tried to write an Android application with an activity that should be launched from a different application. It is not a content provider, just an app with a gui that should not be listed among the installed applications. I have tried the code examples here and it seems to be quite easy to launch existing providers and so on, but I fail to figure out how to just write a "hidden" app and launch it from a different one.

The basic use case is:

App A is a normal apk launchable from the application list.

App B is a different apk with known package and activity names, but is is not visible or launchable from the application list.

App A launches app B using the package and class names (or perhaps a URI constructed from these?).

I fail in the third step. Is it possible to do this?

View 3 Replies View Related

Android :: Activity Check Service To Start Another Activity

Sep 10, 2010

I need to made an activity (without layout) that on start check if a service is running. if it is true it starts Activity2, if it false it starts Activity1.

I tried with this code:

CODE:............

Enter code here

But when I check, in the onCreate method, if serviceConnect!=null I receive sometime a NullPointerExcption.

I tried also to insert the operation in the method onCreate in an Async Task:

CODE:............

View 2 Replies View Related

Android :: Start Activity And Clear Activity History

Apr 22, 2010

I have a huge maze of activities in my application. What I need to do, is that when the user logs in into the system, the activity history should be cleared. I cant just use finish() when I start a new activity, because I want the activities to have a history until the user logs in. I have experimentet with the different flags when starting an activity, but I have had no success.

View 1 Replies View Related

Android :: Map Open Overlay When Pin Is Clicked - Overlay Contains Description / Button

Aug 18, 2010

I like tu use the MapActivity to display some pins. When a pin is pressed i like to open a description. This can I obtain following the tutorial: http://developer.android.com /resources /tutorials/views/hello-mapview. But now I like to put a button on the overlay window. That button should open a detail activity. How can I make this? How is possible to personalize the overlay "info window"?

View 2 Replies View Related

Android :: Start A New Activity From Anther Activity

Nov 19, 2010

I want to start a new activity from ab activity that (extends from Linearlayout) .. but this code is not right

CODE:..........

public class SearchResultForm extends LinearLayout{ ...

And i get this error ..

No enclosing instance of the type SearchResultForm is accessible in scope.

View 4 Replies View Related

Android :: Start An Activity From Non Activity Class

Aug 19, 2009

An activity can be called from existing activity through *startActivity(intent); *

Is t possible to call an activity from non Activity class ? and how?

View 2 Replies View Related

Android :: Start A Map Activity From Other Activity

Apr 8, 2010

I am developing an aplication. This one is designed to login a user, then select how find a place, using simple data or using a map. When I try to set in the event OnClick for select the "Map way" (using intent):

startActivity(new Intent(getApplicationContext(), MapviewController.class));

I have problems and didn't work.

My class and manifest are:

CODE:...........

Do you know any way to call the MapActivity from other?

View 3 Replies View Related

Android :: Google Maps Broadcast Event For Audible Navigation Instructions / Start And Stop?

Dec 14, 2009

I have an application which is playing audio.I have some customers that use this application while driving and who also use the Google Maps application to get directions to the places where they are driving.They have asked me to change my application to pause my audio while the Google Maps application is giving them audio navigation instructions. I am trying to find out if I can register a Broadcast Receiver to let me know when the Google Maps application is giving audio navigation instructions, or if there is a way to detect when any other application has started or stopped playing audio.It seems that this type of functionality would be beneficial for Google Maps and for any type of application which is playing media, so I am hoping that Google Maps is broadcasting events when it starts and stops giving audio navigation instructions, or that there is a generic way to discover when overlapping audio sources are trying to play.

View 6 Replies View Related

Android :: Start New Activity In TAB

Jan 5, 2010

I am working on a travelling application and i am using tabs and each tab has an activity i.e world clock in one tab ,weather data in another tab and so on with in the weather tab i am displaying the users selected cities and the scenario is that when the user selects a city that city's forecast is to be displayed and later to view details as well which is in another activity . how can i launch this new activity from the already started activity with in the same tab ?

View 4 Replies View Related

Android :: Why Won't Activity Start

Sep 13, 2010

I'm trying to start an Activity with startActivityForResult, but I keep getting an ActivityNotFound exception, and I can't work out why. I've looked through the code multiple times, and it seems to be identical to some other, working code. Any suggestions?

The newNoteButton that starts the Activity:

CODE:...........

And the beginning of the TypyEdit Activity:

CODE:................

View 1 Replies View Related

Android :: How To Start An Activity

Sep 15, 2010

I have created two classes: Example1 and Example2, which extends activity.

Example1 contains a UI of buttons, while Example2 contains UI of TextEdit.

I want to call Example2 when a button is clicked, so this code is in an onclick method

Intent i = new Intent();
i.setClassName("com.a.ui", "com.a.ui.Example2");
startActivity(i);

So I am able to get the UI of Example2 successfully.

What's an alternate way of calling intent?

Is there any alternate way to start an activity?

View 2 Replies View Related

Android :: Can Start New Activity That's Not Specified

Jun 25, 2010

I'm trying to do some dynamic code and I load a new class that's supposed to be an Activity and I want to start it, but using the regular startActivity(Intent) wants the Activity to be "Declared" in the AndroidManifest.xml file.

View 1 Replies View Related

Android :: PopupWindow On Activity Start

Feb 21, 2010

I am trying to make a PopupWindow show straight away when an activity has started.

when calling public void showAtLocation (View parent, int gravity, int x, int y)

I get the exception ERROR/AndroidRuntime(2500): Caused by: android.view.WindowManager $BadTokenException: Unable to add window -- token null is not valid; is your activity running?

At the moment I am calling from onCreate, but when calling from onStart or onResume it still gives the same error.

The activity api says the activity is supposed to be running after onResume is called. Where is the best place to load up the PopupWindow if it needs to be done straight away?

At the moment It looks like Activity.onWindowFocusChanged() is the best place.

View 2 Replies View Related

Android :: Start Activity Without Manifest

Jan 22, 2009

I create my Network provider and I want to start Activity from it. Is it necessary to create separate Activity with Manifest and then launch it using startActivity? Can I launch unregistered Activity directly from my provider?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved