Code Monkey home page Code Monkey logo

ti.geo.background's Introduction

Ti.Geo.Background

The goal of Ti.Geo.Background is to make performing background geo location easy. By combining both time (ping) and distance filters Ti.Geo.Background ensures a consistent stream of coordinates accounting for a majority of usage scenarios.

Before you start

iOS Before starting with iOS you need to make sure that the UIBackgroundMode for location has been added to your tiapp.xml. Below shows the snippet that needs to be added into your configuration node.

    <key>UIBackgroundModes</key>
    <array>
        <string>location</string>
    </array> 

Android Before starting with Android you need to make sure that the following service is added to your tiapp.xml. Below shows a snippet demonstrating the service record that is needed.

	<android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest android:installLocation="auto">
            <supports-screens android:anyDensity="false"
                android:largeScreens="true" android:normalScreens="true" android:smallScreens="false"/>
        </manifest>		
	    <services>
	        <service url="bGeo/Ti.Geo.Timer.js" type="interval"/>
	    </services>
	</android>

How To Example

The aim of Ti.Geo.Background is to simply collect coordinates in the background. Because of this, testing on your device is highly recommended. For an example demonstrating how to use Ti.Geo.Background and all of it's configurations please review the included app.js file.

Licensing & Support

This project is licensed under the OSI approved Apache Public License (version 2). For details please see the license associated with each project.

Developed by Ben Bahrenburg available on twitter @benCoding

Learn More

Twitter

Please consider following the @benCoding Twitter for updates and more about Titanium.

Blog

For module updates, Titanium tutorials and more please check out my blog at benCoding.Com.

ti.geo.background's People

Contributors

adampash avatar benbahrenburg avatar willdent 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

Watchers

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

ti.geo.background's Issues

application sometimes closes in the background

some times I am not sure when, the app just disappears. I know it because the start button is in start state and not anymore on "stop" that means "running". Do I have to do anything here?

How to speed up tracking intervals for highest accuracy

Hi Ben,

Using this and it is working in the background which is great but i am curious how can you speed up the time interval for monitoring?

my.bGeo.purpose = "Demo Background Rocks";
my.bGeo.distanceFilter = 100; // can i set this to say 5 meters or will apple complain about usage
my.bGeo.trackSignificantLocationChange = true; // Should i remove this or set to false will it help
my.bGeo.minAge = 3; // Could you explain what this value does
my.bGeo.maxAge = 30; // Could you explain what this value does

In a nutshell i just want to get the background tracking as instant as possible without apple complaining, so i could track a users location on say a walk around the block rather than a long car drive?

Thanks for creating this ;)

Quick update for iOS8 in tiapp.xml

This needs to be added in tiapp.xml as of iOS8 while using this Module:

<ios>
        <plist>
            <dict>
               <key>NSLocationWhenInUseUsageDescription</key>
               <string>Reason for Using NSLocationWhenInUse...</string>
               <key>NSLocationAlwaysUsageDescription</key>
               <string>Reason for Using NSLocationAlwaysUsage...</string>
            </dict>
        </plist>
</ios>

too less location changes

Hey there,

thanks for the plugin. It works pretty good but I notice pretty less location change events. I changed resolution to 10m but still it takes hundreds of meters and at least 10 minutes to update once. Can I tweak this a bit? I am on iOS right now and will do some android tests in the next days. I already have an application running with phonegap that does the trick, but I'd like to switch to Titanium.

regards
Matthias

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.