Skip to content

Enable the power of Location Based Notifications provided by the Plot plugin in your Titanium apps

Notifications You must be signed in to change notification settings

benediktgirz/plot-titanium-module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Plot Appcelerator Titanium module

A module for Appcelerator Titanium apps that adds location based notifications.

Supported platforms

This module was developed for Titanium 3.1.3.GA. This plugins supports both IOS and Android.

Installation

Install our module through the Help => Install Mobile Module. The URLs are:

The following snippet has to be added to one of your scripts used to initialize your application (usually app.js or alloy.js):

var plot = require('com.plotprojects.ti');
plot.initPlot({ publicToken:'REPLACE_ME' });

You can obtain the public token at: http://www.plotprojects.com/getourplugin/

The following snippet has to be added to tiapp.xml to the ti:app element:

<ios>
  <plist>
    <dict>
      <key>UIBackgroundModes</key>
      <array>
        <string>location</string>
      </array>
    </dict>   
  </plist>
</ios>

Function reference

plot.addEventListener("plotNotificationReceived", func)

Allows specifying your own handler when a notification is opened by the user. The function is passed a notification object, which has the fields "message", "data" and "id". When no listener is added, then the "data" field will be treated as URI and opened.

plot.initPlot(config)

Initializes Plot. You must call this method before calling other methods other than the notification handler Plot provides. The config parameter is an object and may have the following properties:

publicTokenYour public token (required)
cooldownPeriodThe cooldown period between notifications in seconds. (default disabled)
enableOnFirstRunWhether Plot should be automatically enabled on the first run (default true)
enableBackgroundModeWarningWhether background warnings should be enabled. See documentation. Default true. (iOS only)

plot.enable()

Enables Plot.

plot.disable()

Disables Plot.

plot.enabled

Returns whether plot is enabled (read-only).

plot.setCooldownPeriod(cooldownSeconds)

Updates the cooldown period.

plot.version

Returns the current version of the Plot plugin.

More information

Website: http://www.plotprojects.com/ Technical support: https://groups.google.com/forum/#!forum/plot-users

License

The source files included in the repository are released under the Apache License, Version 2.0.

About

Enable the power of Location Based Notifications provided by the Plot plugin in your Titanium apps

Resources

Stars

Watchers

Forks

Packages

No packages published