Android :: Customize My Location Overlay Update Times

Aug 11, 2010

I am trying to implement the MyLocationOverlay class from google maps. However, when I try and use my own locationManager -- I cannot get the overlay to acutally draw on the map. I am wondering if I am doing something wrong.

I don't want to call the super method(enbaleMyLocation) of the MyLocationOverlay class because that request updates from the locationManager way too quickly and will eat my battery alive.

Here is my code...

Android :: Customize My Location Overlay Update Times


Android :: Change Update Time Of Location Overlay

Aug 18, 2010

I am trying to see if anyone knows if it is possible to change the update time of MyLocationOverlay (http://bit .ly /dBIVdj). I have tried subclassing MyLocationOverlay and implementing my own location manager but when that happens I do not see the overlay on the map. I would try overriding the drawMyLocation method however I don't know which canvas to provide the method (since I would be drawing onLocationChange). To summarize, I am looking to do three things in MyLocationOverlay subclass:

1. Change the location update times to whatever I want.

2. Draw the "my location" dot with the radius when the onLocationChanged() method is called.
I've thought about making my own special class with special overlay -- but I feel like there has to be a better method to get what I want out of this class.

View 13 Replies View Related

Android :: Override Enable Location In My Location Overlay

Mar 4, 2010

I want to override the method enableMyLocation() in MyLocationOverlay class, in order to implement my own positioning algorithm to get latitude/longitude, and then plot them onto a MapView. I figured out how to do that, but now I'm stuck because I dont know what Canvas to pass when I call the method drawMyLocation().
Here is the MyLocationOverlay class

View 4 Replies View Related

Android :: Map Overlay Labels - Display Name Of Location

Mar 15, 2010

I am building a MapView and I want my custom overlay items to display the name of the location they are marking when the user taps them, like the Android Maps app. I setup the onTap listener and the floating TextView to hold the location name. I still need to set it up so that it redraws the label when the user moves the map, etc. Anyway, I am wondering if I am reinventing the wheel here. Is there a built-in method I am unaware of? I would think that most implementations of MapView have labels. For reference, my implementation so far: in map xml:

<LinearLayout android:id="@+id/mapBubbleWrap" android:layout_width="wrap_content"
andoid:layout_height="wrap_content" android:layout_alignParentTop="true">
<TextView android:id="@+id/mapBubble" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:visibility="gone"
android:background="#ffffff" android:textColor="#ff0000"/>
</LinearLayout>

in my extended ItemizedOverlay:
public boolean onTap(int index) { this.setFocus( mOverlays.get(index) ); return true; }
in my Activity onFocus:
public void onFocusChanged( ItemizedOverlay overlay, OverlayItem item ) {
if( item != null) { mapBubble.setText(item.getTitle());
Point newPoint = mapView.getProjection().toPixels(item.getPoint(), null);
mapBubbleWrap.setPadding(newPoint.x, newPoint.y-10, 0, 0);
mapBubble.setVisibility(View.VISIBLE); } }

View 1 Replies View Related

Android :: How Can I Replace Compass Image Of Location Overlay?

Aug 24, 2010

I want to use my image to replace the Compass image of MyLocationOverlay, how can i implement?

View 1 Replies View Related

Android :: My Location Overlay - Customizing Compass Position On Screen?

Nov 3, 2010

I am using these three lines to add a compass on the MapView: mMyLocationOverlay = new MyLocationOverlay (this,mapView);mMyLocationOverlay. enableCompass(); mapView.getOverlays() .add(mMyLocation Overlay) ; However the default position of the compass showing on the screen is not too good for my apps, and I want to move it to somewhere else. Anyone knows how I can achieve that?

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

Android :: How To Return Location Pressed To MapActivity From An Overlay OnTap Method

Aug 30, 2010

I have an activity that has a button which opens a new MapActivity to select a location by tapping on the map.

The map has an overlay that overrides the onTap method to get the location but I want to return that location to the previous activity but, I don't know how to return the geopoint to the mapactivity in order to call the setResult() and finish() methods, because I can't call them from the Overlay.onTap method.

View 2 Replies View Related

Android :: Location Listener Called Multiple Times

Apr 16, 2010

I am working on an Location Based Application. In this application i am using LocationListener class to update the location when the Location is changed.In each Activity i have different LocationListener to update location and do some specific work on updated location. But my problem is that when i am changing my location through DDMS , the LocationListener is being called of that current Activity as well as all the activities of the whole application where LocationListener has been defined. I don't know whether there should be one LocationListener for the whole application or for each Activity we should have different LocationListener.

You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

View 2 Replies View Related

Android :: Location Manager Minimum Update Time Overridden / When Location Changes?

Oct 26, 2010

I'm developing a mapping app using Eclipse 3.5.I'm setting the minimum update period with the LocationManager's requestLocationUpdates method, via a configuration activity. When I set the property I see in Logcat that the system process sets the value OK.When I actually send a new location from the DDMS emulator control and the location changes on the map view, I see that the system process then sets the minimum time to zero.Below is a capture of the system's log messages. You can see that I'm setting the period to 32 seconds, then 16, then, after I've sent a simulated location change the system sets it to zero.The map responds to location changes to location changes instantly even if they are sent only a couple of seconds apart.

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

HTC EVO 4G : Clicked Update Location But It Says My Location Is Unavailable

Jun 7, 2010

I am having problems with the quick search feature. I did a random search for Mcdonalds and a map pulls up that is no where around me. I clicked update location but it says my location is unavailable. I have GPS enabled and my navigation app works just fine.

View 1 Replies View Related

How To Take Data From Edit Text And Times It Against A Spinner Value - Dynamic Update

Mar 11, 2012

I'm trying to make a simple order system. So the user selects a burger type from a spinner, then the user can enter in the quantity and then there is some math taking place in the background which sets a text view at the bottom with the total price. I'm not sure what method I'm meant to use so that it is updated dynamically when the user changes the text view quantity.

If i just say that all burgers are 2.50, i need some sort of method saying, if/when data is entered into the edit text , take that data and then times it by 2.50 and set it in the total text view below. I'm just unsure on the method part of it so it's dynamic and will change when the edit text quantity is altered.

Code:
package placeorder.com;
import java.util.Random;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
[code]...

View 2 Replies View Related

Jelly Bean :: After Update To 4.3 S4 I9500 Dropping WiFi Connection Many Times

Nov 14, 2013

After update to 4.3 s4 i9500 dropping WiFi connection many times

View 7 Replies View Related

Android :: UNable To Get Update Current Location

Nov 17, 2010

I have an activity that needs to display an alert to user when location is updated,
but i need first to get current location (update last known location) and then start a location update listener to display alert in this activity.

Basically what i need is to display an alert if location changed from time activity was created.

If i use getLastKnownLocation when activity is created, it might be outdated, then the requestLocationUpdate listener is called a few seconds from activity creation time.

How can i do this?

View 1 Replies View Related

Android :: How To Cancel Request Of Location Update With Intent?

Jun 13, 2010

I registered a PendingIntent to requestLocationUpdates(provider, minTime, minDistance, PendingIntent). But when my broadcast receiver receives this intend, how do I remove this request with removeUpdates(PendingIntent)? The receiver doesn't hold a reference to the original PendingIntent.

View 1 Replies View Related

Android :: GPS Not Update Location After Close / Reopen App On Phone

Sep 7, 2009

After I closed my app for a while then reopen it again,my app will not update location or sometime it will take long time( about 5min) before update. How can I fix it? This is my code...

View 3 Replies View Related

Android :: 1.6 Update - GPS Location Provider Stop Unexpectedly

Oct 22, 2009

Looks like I've run into some breakage from 1.5 to 1.6 after all. I am registering location listeners with LocationManager.requestLocationUpdates() With GPS as location provider, I run into a problem with navigation stopping by itself after a few seconds, just to return, stop again, in an endless cycle. I haven't seen this prior to 1.6 Donut and I have no clue what might cause this problem.

Here's the Logcat output:

10-21 21:53:09.147: DEBUG/libgps(74): PDSM_PD_EVENT_GPS_BEGIN 10-21 21:53:11.177: DEBUG/GpsLocationProvider(74): exceeded MIN_FIX_COUNT 10-21 21:53:11.177: DEBUG/GpsLocationProvider(74): stopNavigating 10-21 21:53:11.177: DEBUG/libgps(74): qct_gps_stop 10-21 21:53:11.187: DEBUG/libgps(74): PDSM_PD_EVENT_END 10-21 21:53:11.187: DEBUG/GpsLocationProvider(74): Releasing wakelock 10-21 21:53:13.097: DEBUG/dalvikvm(74): GC freed 2562 objects / 104912 bytes in 223ms 10-21 21:53:20.227: DEBUG/dalvikvm(74): GC freed 1345 objects / 51352 bytes in 236ms 10-21 21:53:21.180: DEBUG/GpsLocationProvider(74): ALARM_WAKEUP 10-21 21:53:21.187: DEBUG/GpsLocationProvider(74): startNavigating 10-21 21:53:21.187: DEBUG/libgps(74): qct_gps_set_position_mode = 1, fix_frequency = 10 10-21 21:53:21.187: DEBUG/libgps(74): qct_gps_start 10-21 21:53:21.207: DEBUG/GpsLocationProvider(74): Acquiring wakelock 10-21 21:53:22.147: DEBUG/libgps(74): PDSM_PD_EVENT_GPS_BEGIN 10-21 21:53:24.167: DEBUG/GpsLocationProvider(74): TTFF: 2978 10-21 21:53:27.287: DEBUG/dalvikvm(74): GC freed 1417 objects / 52512 bytes in 232ms 10-21 21:53:34.397: DEBUG/GpsLocationProvider(74): exceeded MIN_FIX_COUNT 10-21 21:53:34.397: DEBUG/GpsLocationProvider(74): stopNavigating (and so forth)

A web research for these logs didn't turn up anything (which is unusual in my experience), so this leads me to post the question here wondering what the root of the problem might be.

View 10 Replies View Related

Android :: Update Google Latitude Location From 3rd Party Phone App?

May 7, 2010

I am working on an app that uses the GPS on my g1. I'm wondering if it is possible that when I am using the app I can have it update my Google Latitude location every x number of minutes. Any thoughts on how this may be accomplished?

View 1 Replies View Related

HTC Legend : Way To Update Weather / Location?

Aug 2, 2010

Don't know if any of you can help,my location on the home screen on my legend seems to have stuck on where i was yesterday & has not relocated back to where i am now.gone in the programm & it says the place name i was yesterday with current beside it in brackets.added my home city,but cant seem to get it as my current location.Synced a few times this morning & wireless network is ticked,should i tick gps satellites?

View 1 Replies View Related

Motorola Droid :: Browser Location Since 2.1 Update Not Working

Apr 22, 2010

I can't get the browser to have my location since I updated to 2.1.

View 2 Replies View Related

HTC Desire HD :: Unable To Locate Satellite To Update Location

Nov 20, 2010

I was wondering if anybody had the same issue with GPS as I did. When I launched Locations first time, it found the satelite very fast. Now it almost cannot find a satelite to update my location. I wrote almost, because once it did manage, but that was once in at least twenty tries. Do you have any idea how to check if the radio is ok. I read somewhere that one should try with master reset of the phone. If so, would it be enough to backup my data with Titanium backup and option "Backup all users apps + system data" and restore it later on? Will that make a full restore of my phone or do I have to backup some additoial data? Like, what will happend to my personalize data, apps passwords etc.

View -1 Replies View Related

HTC EVO 4G :: After The Froyo Update - GPS Takes Much Longer Than Before To Find My Location And 4G

Aug 29, 2010

I have this phone for probably two months now. Overall I'm quite happy considering I have an old one for more than five years.

However, I have two issues that are really bugging me. I think it might have occurred after the froyo update although I'm not sure.

My first issue is the GPS. I takes much longer than before to find my location although when it does it is very accurate. Lots of time it's more than five minutes. It was much faster before. I don't know what's going on!

Second I have 4G problem. If I serf the web with 4G, I'm fine. When I turn on my tethering more than 90% of the time, it will automatically revert back to 3G even if I have good connection (two or more bars). This is quite maddening to say the least. Was wondering if anyone has any ideas. Will a factory reset.

View 5 Replies View Related

Nexus :: Google Homepage - Update Location Not Working

Apr 14, 2010

also, sometimes finding current location on GPS doesn't work.

I'm guessing i should try a new radio, huh?

View 5 Replies View Related

HTC Desire :: Phone Clock Location Fails To Update

Sep 4, 2010

After a recent trip away I have come back and the HTC clock widget does not update to the current location... it is stuck on 'United Kingdom' instead of my current location...

As a test I went for a drive today and whist 'Latitude' showed where I was, the google home page still showed the wrong location, and HTC widget still showed just 'United Kingdom'...

This has just got me stumped..

View 4 Replies View Related

General :: Failed To Update Location - No Signal Error Message

Mar 9, 2013

I keep getting the above message on my phone. I've tried changing settings within the location tab but the msg keeps popping up.

View 1 Replies View Related

General :: Google Play Services Update Breaks Location Accuracy

Apr 23, 2014

Phone settings: Location : Battery Saving (GPS off, using Wifi/network location only)

On Google Play Services 4.0.x - I get very accurate location small circle around where my house is.

After updating to 4.2.25 - I get a large circle - maybe the radius of an entire block / surface area of a cell tower coverage roughly

Uninstall the update to play services (back to 4.0.x) - get very accurate location again.

I am using a RAZR HD with 4.4.2 kit kat / CM11.

Did play services update broke my specific phone?

I would stay on the older Play Services but Hangouts and Maps keep bitching about needing to update it.

View 6 Replies View Related

Android :: Location Manager Does Not Detect Location Correctly

Sep 17, 2010

In my application I have to fetch the current location. First it correctly fetches the location. But we are moving from the current location to some other location. It shows the previous address. It is not updating the location. My code is: locManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); locListener = new MyLocationListener();locManager.requestLocationUpdates(LocationManager .GPS_PROVIDER ,0,0,locListener); location = locManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);if(location != null){latitude = location.getLatitude();longitude = location.getLongitude();} Please find the mistake and when i launch first time it is not working on second time itself it is working so check this thing also.

View 1 Replies View Related

Android :: Testing Location Using Network As Location Provider?

Jan 27, 2010

I have an application which uses the network as the location provider (rather than GPS eg.), however I can't seem to figure out how to send the emulator test coordinates. In DDMS I would usually send coordinates in the Emulator Control tab.Is there a place to simulate coordinates derived from the cell phone network provider?

View 6 Replies View Related

Android :: Location Provider / Coarse Location

Jun 25, 2009

The way we are retrieving locations from our Android phones is to 1st get a Coarse Location followed by a Fine Location. This is for the case where the user may be inside a building initially and unable to track satellites. After we get our coarse location we transition to a fine location to track satellites. This method has been working fine for several months. We recently upgraded to 1.5 and our mapping application, to my recollection continued to work.For the past couple of days we have not been able to get a coarse location and we are receiving a status message in the onStatusChange callback of.We have re- installed previous versions our code that used 1.1 and we are receiving the same status message of .TEMPORARILY_UNAVAILABLE. Other than the obvious description of the constant, we can find no meaningful information.

View 2 Replies View Related







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