Coder Social home page Coder Social logo

tracker's Introduction

Building a GPS Tracker App in Titanium

I have big plans this summer. I hope to cycle 400km through Rwanda (Africa) and raise €10,000 in funds for Compassion, a children aid charity.

Obviously this means I'm on my bike a lot these days. I've been tracking all my rides using Ride with GPS from the start, but a few weeks ago I wondered how easy it would be to build such a GPS tracker myself in Titanium.

So, I present to you...

Tracker 4 Compassion

This initial version simply tracks your geolocation. You can view your previous routes on a map or browse through the individual data points. I plan to add more features in the next two months as I start to use the app for my own rides and hope to have it fairly complete by the time I go to Rwanda in June.

Screenshots

Get it on Google Play     

Learn from the source

As an Appcelerator Developer Evangelist I help developers to build Native Mobile Apps and APIs in JavaScript. One way I do this is by building and blogging about sample apps.

In this spirit I open sourced the app on GitHub and as I continue to develop the app I will publish blog posts to guide you through the code and share some best practices:

Contribute to the app...or to Compassion

I use GitHub Issues to track planned features, enhancements and bugs. Feel free to contribute ideas there, or help me resolve them and send a PR. I will list the names of all contributors on the app's Settings screen.

Of course you are also more then welcome to contribute to Compassion.

I'll follow up with the first blog post on the app source code soon.

Code Strong, Code with Compassion! 🚴

This software is licensed under MIT. Learn from it and use it in any way you want, as long as you include the copyright notice and permission notice in LICENSE, including the link to http://fokkezb.nl/rwanda. Also consider to donate to Compassion.

tracker's People

Contributors

clemblanco avatar fokkezb avatar hansemannn avatar kassemitani avatar pebosi avatar securit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tracker's Issues

Provide demo data

To explore the features, the app should either come installed with a tracked activity and/or allow you to import an example activity later.

Ability to pause

How would you go about implementing a pause or more specifically, if I restart the tracking anytime less than 5 mins after the previous track ended, append to that track and not a new one.

Android - Click on listView item to open details crash the app

If my device have the "Location" disabled and I started my "Track" I get no information like "0 km/h" or "0 mph", beneath the circle with the stop button.

Afterwards I go to the Rides tab, I click on ListView Item to get my detail View, is where i get the crash.
If I enable the "Location" all works correctly, but then I can't not delete the item that crash the app, because in order to delete an item in this app I have to open the detail View, I'm correct?
Hope this helps!

Tracking: Detect pause

On iOS we can let iOS detect pause/resume of motion (#7) but on Android we can't. Instead, we can set an interval and if the last location update is X seconds old, interpret this as a pause. Then when a location comes in again this is interpreted as resume.

Back button prematurely closes the app

Hi,
under Android 6.0.1 clicking the back button appears to close the app rather than backgrounding it. Would it be possible to add a dialog box to pop up and say "are you sure you want to exit" when tracking?
What about using intents as a way to keep the application running as a task?

I tried something like this.
in tracker.xml:

<Window id="win" onAndroidback="doAndroidBack" titleid="Tracking">

in tracker.js in the SEF

(function() {
  if (OS_ANDROID) { 
  	$.win.onBack = doAndroidBack; 
 }

and later

function doAndroidBack() {
	if (ride.isTracking()){
		var dialog = Ti.UI.createAlertDialog({
	    	title: 'Closing tracker',
	    	message: 'Closing tracker will stop recording. Are you sure?',
	    	buttonNames: ['Yes', 'No'],
	    	cancel: 1
	  	});
	  	dialog.show();
	  	dialog.addEventListener('click', function (e) {
    		if (e.index === 0) {
    			Ti.UI.currentWindow.close();
    		}
    	});
	} else {
		Ti.UI.currentWindow.close();
	}  	
}

but this did not have the desired effect.

After I click to start my tracker, speed Label stay empty.

After I click to start my tracker I never got the speed information on "speedLabel" like "0 km/h" or "0 mph" , beneath the circle with the stop tracker button.
I suppose it is not normal?

Notes:

At least on iOS my device (iphone 6)

Publishing Questions

Hello

This is not technival questions but more about Titanium framework it self, which is open source but Appcaelrator is not, did you publish these app with plan or without plan? I am bit confused about that..

Thanks

Ride: Display average speed

Can be calculated in two ways:

  • Average of all speeds
  • Calculate form total distance (#5) and total time (will need to account for pauses)

Application error + question

Hi @FokkeZB :)

I was trying to build your app, to see if it gets GPS coordinates when screen is turned off. I haven't figured out yet how to get my apps to work with background data - they stop receiving anything when the app has been in the background for 5-10 seconds. Is this something you've experimented with, and possibly solved?

Anyway, I'm getting an error when the app starts up.
Built for iOS 9.3 with 5.2.2.GA and iPhone 4s simulator.
The error is:
undefined is not a function (evaluating 'require("alloy/moment".locale(Ti.Locale.currentLocale)') at app.js (line 6)

Path Warning Music Bot/Sound Motivation

Hello!!! I have few proposals for you

  • Path Warning
  • Music Bot/Sound Motivation

Path Warning: This is a function that will serve as a warning on track conditions in terms of landscape, Bleeding, raveling, Potholes, and stripping, which there is a need for incorporation of a sensor to peruse like 15 feet ahead with mobile cam when riding which phone will be placed on bicycle handle band to see indicators of any road defect this could be screen flashlight or heavy vibrate.
Also, there ought to be a switch to enable this feature put users in control.

Music Bot/Sound Motivation: This is a straightforward function to include music into the application yet that could be executed progressively; whereby, there will be a section for users to enter all the music he/she might want to tune in to while on the bicycle and will be fetched from the internet and will play as recorded sequentially on the application until the end. This is somewhat of a capacity that will presumably require a command to function properly, and users will also be placed to enable or disable this feature.

Mockups

Image showing how path warning could look like if implemented

Image below shows how the proposed music feature could be incorporated

Benefits

The principle advantage of Path warning is safety for users that have grasped and will grasp the application because each movement wellbeing is exceptionally fundamental and ought not to be ignored for any reason.

Contingent upon the way any user choose to take, there are typical sorts of road imperfection which I think potholes is one of the perils that can cause harm. The fuse of this component will fill in as fast alarm notwithstanding when the user not very focused on the path he/she is taking.

Music Bot/Sound Motivation is additionally a decent element significantly to entertain reasons. I trust this isn't for everyone except for individuals that like tuning in to music while doing any action for motivational purposes, to prop them up forward.

The consolidation of the bots to get music from the web will make the application to be boundless; users will have the capacity to play any music of there decision without downloading.

Those are the features I trust will be decent if consolidated into the thoughts that you have as a top priority and pushed on issues. I believe the application will dope once done.

Much obliged!!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.