Android :: Turn Off GPS Icon When LocationListener Is Sleeping

Jul 26, 2010

I am struggling a bit with the LocationListener in Android.I want to make an app that will get the current GPS location, and then afterwards sleep for a long time. A day or more. In this period of time i want the GPS notification icon to not show.What i have now, is in the onLocationChanged a Thread.sleep(x) but this will keep the icon on in the sleep period. How can i do this, and is there a better approach than to use Thread.sleep?

Android :: Turn off GPS icon when LocationListener is sleeping


Android :: GPS LocationListener And Phone Sleeping

Sep 20, 2010

I've created service which has LocationListener in it. In order to keep service running the service is set as foreground. I have some questions about phone power management and sleeping in that circumstances: Will phone go to sleep while such service is running? How can I save power in this stuation?

View 2 Replies View Related

Android :: LocationListener Not Refreshing

May 25, 2010

I'm trying to develop a small app, that can retrieve GPS coordinates, and store them, so I can retrace the path I took. The thing is, the GPS on Android emulator is kind of screwing around with my nerves... First of all, the Mock Position system doesn't work, so I'm manually fixing the coordinates with telnet "geo fix" command. Second of all, the location listener seems to not be refreshing. I'm lauching the app, fixing a first set of coordinates, and observing the response I expect. But when I push a second set of coordinates, the app simply doesn't react.

I tried a lot -big lot- of ideas on this, and I'm kind of running short...

By the way, I'm developping on Eclipse with ADT, and the SDK for Android 1.5 (French HTC Heros are still with Android 1.5) so that I can use my own app.

Here's my code (just the coordinate retrieval part) :

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

View 3 Replies View Related

Android :: GPS Queueing In LocationListener

Mar 22, 2010

The application under development was to distinguish between the current location of the android phone based upon GPS signal when it was available. When it is not available, alternate methods are being used to distinguish the user's location. The application uses a private locationlistener class that implements the LocationListener class. The code within the onLocationChanged( ) method to be overridden will draw the location on the google map as a dot as they are received.

I have noticed however that something is amiss. If you start outside the building, it will estimate your position with several dots around your current location. When you walk through a building where you don't get GPS, the dots are not drawn as expected, but as soon as you step outside again on the other side of the building it rapidly draws dots far away from (but leading up to) your location, until it gets to your actual current location. I don't understand how these other values are retrieved and why they seem to poke their ugly heads in, once the user steps back outside............

View 8 Replies View Related

Android :: Why Does LocationListener Become Null?

Jan 28, 2010

I am having issues regarding a LocationListener in my Service called myService.

Here is my code:

///onStart method ..
onStart() {
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE)
.
.
provider = locationManager.getBestProvider(criteria, true);
locationListener = (LocationListener) new MyLocationListener();
locationManager.requestLocationUpdates(provider, 0, 0, locationListener);
}

In my Activity there is a button which should stop the service. On the click of the button I am doing:

stopService(new Intent(getApplicationContext(), myService.class).................

View 1 Replies View Related

Android :: LocationListener Polling Interval

Oct 5, 2010

I have a Service that uses the LocationListener, and it will be running from boot, indefinitely. My question is, how often is too often to listen for location updates? Is 5 minutes a battery killer? What about 1?

View 1 Replies View Related

Android :: PendingIntent Vs LocationListener On RequestLocationUpdates?

Jun 25, 2010

you can subscribe to requestLocationUpdates via two ways one by specifing a PendingIntent the other is by using a LocationListener. When is advised the one and when the other?

View 1 Replies View Related

Android :: Service With LocationListener Callbacks

Sep 18, 2010

I have an android application. Based on the current geo location of user, I want to fetch some remote data in background and store it. My implementation is: At specific interval a alarm fires up my service. Service uses an anonymous class to query current location and registers a locationListener callback. On call of onLocationChanged() I initiate the remote data fetch from server.

However once my service is done registering the location listener using anonymos class, it returns as expected; as it doesn't wait for callback to happen before finishing. Since callback takes some time and makes a call when service has already returned, it throws an error saying: java.lang.RuntimeException: Handler{43e82510} sending message to a Handler on a dead thread

Which is quite understandable. One quick workaround for me now is that I can use getLastKnownLocation from locationManager as that doesn't respond back by callback; but what if I do want the latest location right now, in a service and not activity? How can I wait for callback to happen and stop my service from returning.
Also, at what point does lastKnownlocation gets updated? Everytime GPS registers a new location; does it update it? What I want to know is that if it's not latest can it still be closed to latest? As I didn't see an option in android emulator to configure the time period between subsequent updates.

View 1 Replies View Related

Samsung Behold 2 :: Can't Turn Off TXT Notification Icon

Oct 5, 2010

I'm using handcent and Can't Turn Off the default TXT notification Icon on the default android messaging app.

View 6 Replies View Related

HTC Droid Eris : Speakerphone Icon Is Always On / How To Turn Off It?

Aug 19, 2010

No matter what, my speakerphone icon is always on. This happened after I let my son look at my phone. I cannot find the setting to turn this off.

View 2 Replies View Related

Android :: LocationListener Being 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.

View 1 Replies View Related

Android :: Triggering LocationListener's Event Manually

Nov 9, 2010

Is there a way to manually trigger the code inside a LocationListener's onLocationChanged method? It should receive a Location object with the last known location, I guess.

View 2 Replies View Related

Android :: LocationListener And Location Api Working In Dev Phone (G1)

Feb 19, 2009

i need to know about the LocationListener() working in the Android DEV Phone(ADP1) Does it expect the user(device) to move in order to update the current location details or it automatically updates when ever the gps is enabled? Another query is regarding the getLastKnownLocation(). When is that last known location will be lost and thus returns null... (ADP1).

View 5 Replies View Related

General :: How To Turn Off Unknown Caller Icon And Title

Feb 5, 2012

I use my htc rezound as a business telephone line . 90 percent of the people calling me will not be on my contact list. I hate that's all I see is unknown caller title and the generic icon show up I actually have to struggle to see the very small phone number of the general customer phone number calling in. my recently called list is full of unknown callers. all I see is just those general icons an unknown callers I have to struggle to see my recently call list phone numbers. Any way to set up.just to. show me the callers phone numbers?

View 2 Replies View Related

Android :: Unsubscribe LocationListener From Recieving Updates From LocationManager?

Jan 19, 2010

How do I unsubscribe a LocationListener from recieving updates from the LocationManager?

mLocationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE);
mListener = new LocationListener() {
public void onLocationChanged(Location location) {
Log.i("LocationListener", "Logging Change");
}
}
mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
5000, 1, mListener);

After I have exited the the view that created the LocationListener I am still getting log messages in the LogCat window. I understand that this is because I am orphaning the listener but I cannot see any destory method on the LocationListener nor can I see any "remove listener" style methods on the LocationManager object.

View 3 Replies View Related

Android :: Working Of LocationListener() In Real Time On Device?

Feb 12, 2009

i need to know about the LocationListener() working in the real time. Does it expect the user(device) to move in order to update the current location details or it automatically updates when ever the gps is enabled? Another query is regarding the getLastKnownLocation(). When is that last known location will be lost and thus returns null... (in realtime).

View 3 Replies View Related

General :: Samsung Galaxy Note 3 / Turn Off Email Counter On Email Icon?

Mar 9, 2014

I have a Samsung Galaxy Note 3 and I am using the native email application with an Exchange account. I do not like the email counter telling me how many unread messages I have. I have notifications turned off so I do not have anything showing up in my notification bar. Is there a way to disable to email counter?

View 4 Replies View Related

Android :: How To Tell Device Is Sleeping?

Nov 24, 2010

Here's my scenario. I have an app that is playing backgound sounds. Using the BroadcastReceiver I can tell when the display turns off, and then kill the sounds. I can also tell if the screen turns back on. However, if the device is in the lock state I don't want the audio to start. Therefore I wait for the ACTION_USER_PRESENT intent to signal. That all works, except that if the user turns the screen back on quickly after it was turned off, you don't get the lock screen or the ACTION_USER_PRESENT message. So, is there a way to tell, when the screen turns back on, if the device is locked or not, which I guess also means sleeping or not?

View 1 Replies View Related

Android :: How To Prevent Sleeping

Sep 5, 2010

I 'm working with GPS in my application. When phone go to sleep, the GPS's data don't update. I want to stay phone screen wake up until my app will be close. How can I prevent sleeping in Android?

View 2 Replies View Related

Android :: Prevent Phone From Sleeping?

Sep 27, 2010

I am developing an application, for an optimal operation I need that the app prevents phone from sleeping. How can I do it? It has to be like google maps: System Tools prevent phone from sleeping

View 11 Replies View Related

Android :: Way To Wake A Sleeping Wi-Fi Connection

Mar 29, 2010

Often my mobile network is turned off and I just use a Wi-Fi hotspot.

If the phone is not plugged in, the Wi-Fi connection will go to sleep after some length of inactivity.

I could be wrong, but a call to ConnectivityManager.getActiveNetworkInfo().isConnected() does not wake the connection.

So, what is the best way to wake the connection?

In general, I'm looking to write an isConnected() method which will return true/false, optionally blocking returning until a wakeable internet connection is awoken.

View 3 Replies View Related

Android :: Sleeping In OnTouchEvent Blocks OnSensorChanged

Nov 13, 2010

I'm making an application which will utilize both touchevents and sensorevents. The problem with touchevents is that they fire off very often, and thereby consumes massive amounts of CPU time. The common solution is to do a Thread.sleep to make it cool down.However, if one wants to use both the onTouchEvent and onSensorChanged in the same activity, applying the Thread.sleep hack will also slow down onSensorChanged. This is obviously caused by the two methods being called from the same (ui) thread.Is there some way to call onTouchEvent from a different thread than the ui, so one could do the Thread.sleep trick without slowing down onSensorChanged as well?

View 1 Replies View Related

Android :: Applications Prevent Phone From Sleeping?

Dec 14, 2009

Why do so many of the applications say they prevent the phone from sleeping? Is this a problem if the applications are left open or a problem with the applications all of the time no mater if they are open or not?

View 4 Replies View Related

Android :: How To Keep Droid Device From Sleeping While Plugged In?

Oct 16, 2010

I'd like to keep the screen on whenever one of my Activities are running and the phone is plugged in to a power source. I know that Wakelocks are tricky, so I'm looking for an example or some documentation on how to accomplish this specific goal.

View 2 Replies View Related

Android :: Application To Silence SMS / MMS & EMAIL Notifications When Sleeping

Jul 22, 2010

I used to have a BB Tour. I could set it up to turn off notifications for email and text messages when I had the phone plugged in. The phone would still ring. I am looking for an app for my HTC Incredible that I could do basically the same thing. I would like to set the phone up so when I'm sleeping the notifications for SMS/MMS and EMAIL messages are muted, but the ringer for the phone is still active. Does anyone know of such an app or setting to do this?

View 4 Replies View Related

Android :: Getting Network Restarted After Phone Starts Sleeping

Apr 10, 2009

I have a long lived service, it wakes up (via the AlarmManager) at intervals and connects to a web server. If the phone goes to sleep and one of my polling intervals happens the phone wakes up enough to let me attempt to connect to the network but the ConnectionManager claims there is no network. Given the system log this is correct, it was torn down. Pushing "Menu" once is enough to get the network back up and then my service can connect. How do I get the network to reconstruct itself?

View 2 Replies View Related

Android :: Server Socket To Wake Up A Sleeping Phone

Mar 17, 2010

I noticed that if the Android phone is listening on a ServerSocket on the 3G network, and is then put to sleep with the power button, it no longer listens for incoming connections. The incoming TCP connection does not wake up the phone. Is this there a way to enable waking up a sleeping phone on incoming Server Socket connections, the way that incoming data on a regular Socket does?

View 2 Replies View Related

Android :: Have TimerTask (or Equivalent) That Executes Even While Display Is Sleeping?

Feb 9, 2010

I have noticed that when display goes to sleep, my TimerTask is also freezed, until display is waked up. I need my TimerTask to execute (a BlueTooth operation every few minutes) even while the display is sleeping.

How do i achieve this (eventually using something else instead of a TimerTask)?

View 3 Replies View Related

HTC EVO 4G :: Phone Not Sleeping

Aug 31, 2010

I took the plunge and finally rooted my phone (hand clap!!). I flashed a custom kernel (by NETARCHY[4.0.3a]). At 1st everything worked fine (followed EarlyMon's "How to Fix FROYO"---since i lost all my data). The following day i tried another kernel (baked kernel #5). That kernel didnt work to well on my phone so I reflashed NETARCHY's kernel. When i noticed that my battery was draining quickly, i looked in my SPARE PARTS and noticed that my phone is not sleeping---problem is I dont know what it is. Do i need to do a hard reset again---or should i flash another kernel?? Stuck between a rock and a hard place
(Mods--did this in a rush, please excuse if this is posted in wrong forum)

View 3 Replies View Related

HTC EVO 4G :: Phone Not Sleeping - 100% Awake

Jun 22, 2010

A few days ago I after reading some threads on reboots and decided to check the awake time and found that phone wasnt sleeping. Battery life wasnt affected all that bad I thought, lasting throughout the day, however I did an FDR reloaded only a few programs and the problem went away (along with the reboots that occurred nearly everytime I started navigator and only navigator). Battery life was exceptional afterwards, still having at least 60% remaining after unplugging around 8 am and checking later than 7pm

I reloaded the following apps
Shazam
xing barcode scanner
LED desire
Google Earth
Spare Parts, and just now sys panel lite.

Today I experienced another reboot, checked awake time and found it to be at 100% again. After unplugging at 8am and checking at 7 pm, battery remaining is at 36%, way under normal (im usually at 60%+ with heavier usage). Very moderate use today , maybe a dozen short calls, a couple emails, no browsing, took 1 picture and sms'd it, and LED desire (first time used since re-installed) I do keep both my wifi and BT on, 4g off. Ive been in good signal range all day.

View 9 Replies View Related







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