Help required for A GPS alarm application...

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Help required for A GPS alarm application...

Postby kiranp » Sat Aug 01, 2009 3:47 pm

Hello everyone!

I have recently joined this VERY useful community. This is my first post here. :)

Well, lets get to my point:
I want to make an application in Android, that will sound an alarm based on the location provided by the GPS.
Example, consider I am travelling from a place 'A' to 'B' by say a train, and the place A and B being far, there are chances of one falling asleep on the journey.
So what I want is an alarm, that will ring when I am at 'x' kms. from the destination. ( The value 'x' will vary, and will be specified by the user )

i.e. in short, given the destination, i need an alarm that will ring when a person reaches at the specified distance of 'x' kms. from his destination.


What I have thought for this is:
We need to check if the location of the person is within the "circle" formed by considering the destination as center and radius of the given value 'x' kms.
Another point is that, since travel is by a vehicle, a timer would be needed to do the checking periodically.


So this is what I am trying to make. And I really need much help for it because, I am very new to Android :(
I do not have any experince with developing applications for it. :(
I have only tried out around 3-4 examples. ( Includes Hello World, A simple UI for Login n Password, etc)
:'(

So, I would be really grateful if someone helps me out here. :?
I want to get more experience with development on Android, so that I would be able to create more useful applications on it.
A person without a sense of humor is like a wagon without springs. It's jolted by every pebble on the road.

:)
kiranp
Developer
Developer
 
Posts: 28
Joined: Sat Aug 01, 2009 2:57 pm
Location: India

Top

Postby kiranp » Sun Aug 02, 2009 9:00 am

Please help me out soon friends... :(

I am kind of beginning to feel very depressed, since I am not able to come up with any output... :cry:

Please... its really important to me..
A person without a sense of humor is like a wagon without springs. It's jolted by every pebble on the road.

:)
kiranp
Developer
Developer
 
Posts: 28
Joined: Sat Aug 01, 2009 2:57 pm
Location: India

Postby mathuin » Sun Aug 02, 2009 10:04 am

http://developer.android.com/reference/ ... nager.html

This page describes how to get access to the location information.

Scroll down to "requestLocationUpdates". This explains how to be notified when the location changes by more than a certain number of meters. For my application, I only need to be notified after the user has traveled at least one kilometer -- setting the third argument to 1000 helps me conserve battery power. The fourth argument is a LocationListener object. Inside that object you can have a function "onLocationChanged(Location location)" which is called with the new location as an argument when the location has changed (sounds obvious, I know) and that's where you should check for proximity to your target.

How to check for proximity? I use "Location.distanceBetween" to return the number of meters between the current location and another location -- when that value drops below your warning threshold, you can perform whatever warning act you feel is required.

If you want to see how I did it, my application's source code is available via SourceForge -- the project name is "hfbeaconandroid" and it's checked into Subversion.

Good luck!
mathuin
Junior Developer
Junior Developer
 
Posts: 15
Joined: Wed Jul 15, 2009 3:10 am

Postby kiranp » Sun Aug 02, 2009 10:43 am

Thanks for the reply mathuin.
:)

I'll check it out, and post any more problems i have...
A person without a sense of humor is like a wagon without springs. It's jolted by every pebble on the road.

:)
kiranp
Developer
Developer
 
Posts: 28
Joined: Sat Aug 01, 2009 2:57 pm
Location: India

Postby lesha_aw » Mon Aug 03, 2009 10:11 pm

You can check my project

http://sourceforge.net/projects/myplacesalarm/

(it's a GPS based alarm ringer, with googlemap interface)
lesha_aw
Freshman
Freshman
 
Posts: 8
Joined: Wed Nov 19, 2008 8:57 pm

Postby kiranp » Tue Aug 04, 2009 5:01 am

hey.. lesha_aw :)

Thanks for the upload. :)

But thats an .apk file u have uploaded. May I please, see the source code?
The source cannot be found from the .apk files.

I want to see the way it is implemented. :)
A person without a sense of humor is like a wagon without springs. It's jolted by every pebble on the road.

:)
kiranp
Developer
Developer
 
Posts: 28
Joined: Sat Aug 01, 2009 2:57 pm
Location: India

Top

Postby kiranp » Tue Aug 04, 2009 5:06 am

Hi Lesha_aw....

Sorry... I got the source... I just didn't know where to check. :)
Thought it might be in the downloads section itself.

Thankz a lot. I'll check it out when I come back from college today. :)

Thankz once again. :)
A person without a sense of humor is like a wagon without springs. It's jolted by every pebble on the road.

:)
kiranp
Developer
Developer
 
Posts: 28
Joined: Sat Aug 01, 2009 2:57 pm
Location: India

Re: Help required for A GPS alarm application...

Postby sougatachandra » Thu Jan 13, 2011 9:52 am

posting.php?mode=reply&f=26&t=7353&sid=1651457d810b6dd0ba442e20bb81eabc#

Hi,

Though this post is quite old , but i hope you will get the message.
I tried using the source code given in the url.
But i could find the following problems ...

1> the code cannot load the default ringtone and gives an error if we try to use the alarm settings.
2> the code does not generate alarm on reaching the tagged code ....


Any help regarding this ??

Thanks,

Sougata
sougatachandra
Once Poster
Once Poster
 
Posts: 1
Joined: Thu Nov 11, 2010 5:20 pm

Re: Help required for A GPS alarm application...

Postby saurabhkpatel » Mon Jan 24, 2011 8:24 am

hi frd..


if u got the source code of this application.....so send me please..
i want to check how that source code is implemented..

:)

Thanks
saurabh patel
saurabhkpatel
Freshman
Freshman
 
Posts: 2
Joined: Wed Jan 12, 2011 10:33 am

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 2 guests