[android-developers] Best strategy in handling location change

2012-09-22 Thread Ichsan
Currently, I'm creating an app which alarms user tasks at specific time. 
The time is automatically calculated based on coarse location. So, when 
users fly miles away, the alarm time has become invalid. So the app needs 
to recalculate the time. FYI, the alarm should be always on (when exiting 
the app, the alarm is still set).

To solve this, I don't want to listen for coarse location change since it 
eats my battery. Instead, my strategy is by starting alarm each 2 hours 
just to start a location listener (to fix the task alarm). What do you 
think of this strategy?

How to prepare an alarm only once? Can I check if I've done it?

Those are my questions.

Thanks...

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best strategy in handling location change

2012-09-23 Thread Harri Smått
Hi,

This is a wild guess, totally out of my knowledge, but do you think listening 
to android.intent.action.TIMEZONE_CHANGED gave you means to act accordingly to 
your needs?

--
H

On Sep 23, 2012, at 9:59 AM, Ichsan  wrote:
> Currently, I'm creating an app which alarms user tasks at specific time. The 
> time is automatically calculated based on coarse location. So, when users fly 
> miles away, the alarm time has become invalid. So the app needs to 
> recalculate the time. FYI, the alarm should be always on (when exiting the 
> app, the alarm is still set).
> 
> To solve this, I don't want to listen for coarse location change since it 
> eats my battery. Instead, my strategy is by starting alarm each 2 hours just 
> to start a location listener (to fix the task alarm). What do you think of 
> this strategy?

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Best strategy in handling location change

2012-09-23 Thread TreKing
On Sun, Sep 23, 2012 at 1:59 AM, Ichsan  wrote:

> Currently, I'm creating an app which alarms user tasks at specific time.
> The time is automatically calculated based on coarse location.


Why are you calculating time based on location? If you better explain your
use case you'll probably get a better response.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best strategy in handling location change

2012-09-23 Thread Muhammad Ichsan
To simplify, this is an application which set off alarm by location. The
alarm is determined by user coarse location.
On Sep 24, 2012 10:22 AM, "TreKing"  wrote:

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best strategy in handling location change

2012-09-23 Thread Kristopher Micinski
wait so then why are you concerned about the time...

kris

On Mon, Sep 24, 2012 at 12:25 AM, Muhammad Ichsan  wrote:
> To simplify, this is an application which set off alarm by location. The
> alarm is determined by user coarse location.
>
> On Sep 24, 2012 10:22 AM, "TreKing"  wrote:
>
> --
> 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+unsubscr...@googlegroups.com
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Best strategy in handling location change

2012-09-23 Thread TreKing
On Sun, Sep 23, 2012 at 11:25 PM, Muhammad Ichsan  wrote:

> To simplify, this is an application which set off alarm by location. The
> alarm is determined by user coarse location.
>
Providing less information does not simplify anything.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best strategy in handling location change

2012-09-26 Thread Ichsan


On Monday, 24 September 2012 12:17:51 UTC+7, TreKing wrote:
>
> On Sun, Sep 23, 2012 at 11:25 PM, Muhammad Ichsan 
> 
> > wrote:
>
>> To simplify, this is an application which set off alarm by location. The 
>> alarm is determined by user coarse location.
>>
> Providing less information does not simplify anything.
>

The app is an app which reminds users of doing a task. When should the 
alarm go off? The alarm is scheduled by sun positioning which is relative 
to user's coarse position. So, when a user travels far away, the alarm can 
change. The 100 miles movoment probably may shift time about 1 minute 
(based on sun position. The method is approached by calculation based on 
user coarse location). I'm sorry if it was not clear, but is that clear 
enough now?


>

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Best strategy in handling location change

2012-09-26 Thread TreKing
On Wed, Sep 26, 2012 at 2:50 AM, Ichsan  wrote:

> I'm sorry if it was not clear, but is that clear enough now?


I, for one, have no idea what you're talking about. Sorry. But if you want
to set an alarm based on the user's location changing, you can register a
Location listener to get notified of this fact. If you don't want to drain
battery by having this on all the time, you can set a recurring alarm that
checks the current location every X minutes or hours or something.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en