hi, Nitin thanx for the suggestion, but i know 1 min. is very costly for
battery life , right now my app is in testing face that is why i used 1
min. after that i'll use 5 to 10 min.

On Sat, Nov 10, 2012 at 12:52 PM, Nitin Sethi <[email protected]> wrote:

> You issue aside, listening for GPS fix every one minute is surely going to
> drain user's battery big time. Are your app user's okay with the battery
> level going from 100% to ZERO in less than 4 hours?
>
>
> On Saturday, 10 November 2012 01:51:25 UTC+5:30, Rajan wrote:
>>
>> What i need to do
>> =============
>> 1. I need to get Latitude & longitude every 1 min.
>> 2. after getting this lat & long, i need to call one web service through
>> which i have to send <latitude, longitude, TAG>
>>
>> TAG is kind of "ON" or "OFF" text :  that can be set on button press
>> event.
>>
>> What i have done
>> =============
>> 1. i created one simple service that can be use to get lat & long
>> and also use AsynTask inside the service for calling a webservice
>>
>> 2. i have use Time class for ping after every 1 min.
>>
>> 3. now i need to add TAG value inside the background service using on
>> button pressed event : that i have already done
>>
>> [ like :
>>
>> Intent i = new Intent(this, BackgroundService.class);
>> i.putExtra("TAG","ON");
>> startService(i);
>> ]
>>
>> My Problem
>> =========
>>
>> it block my UI thread after every 1 min. , means when my time is going to
>> ping a backgroundService for finding a lat & long at that time it will
>> block my UI for few seconds.
>> so how can i prevent my UI thread ??
>>
>> Note : for start & stop to the background service, i have use Handler
>> class & Message class
>>
>> please help me i'm stuck in this scenario since last 2 to 3 days, i
>> didn't find any single way to prevent my UI thread.
>>
>> thank you.
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
.

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

Reply via email to