All Projects → AppWerft → Ti.applifecyle

AppWerft / Ti.applifecyle

Licence: other
Titanium module for app events in android

Labels

Projects that are alternatives of or similar to Ti.applifecyle

Bbb Buildroot Fwup
Example project showing how to use buildroot and fwup
Stars: ✭ 23 (+187.5%)
Mutual labels:  makefile
Slim Php Docker Starter
Starter for a dockerized Slim Framework application
Stars: ✭ 26 (+225%)
Mutual labels:  makefile
Device Sony Eagle
Stars: ✭ 7 (-12.5%)
Mutual labels:  makefile
Ansible Docker Compose
Ansible Role which installs docker-compose
Stars: ✭ 24 (+200%)
Mutual labels:  makefile
K8s Clusters
Simple kubernetes clusters on cloud providers for development
Stars: ✭ 26 (+225%)
Mutual labels:  makefile
Malloc trim
Gives some ruby memory back to the OS
Stars: ✭ 27 (+237.5%)
Mutual labels:  makefile
Busybox
Prometheus Busybox Docker base images
Stars: ✭ 23 (+187.5%)
Mutual labels:  makefile
Base2grob
Stars: ✭ 8 (+0%)
Mutual labels:  makefile
Wordpress Starter
📦 A starter template for WordPress websites
Stars: ✭ 26 (+225%)
Mutual labels:  makefile
Rpi Hugo
Raspberry Pi compatible Docker Image with Hugo - a static webpage builder
Stars: ✭ 7 (-12.5%)
Mutual labels:  makefile
Buildroot Submodule
Example of use of buildroot as a submodule
Stars: ✭ 24 (+200%)
Mutual labels:  makefile
Rabbitmq Metronome
RabbitMQ example plugin
Stars: ✭ 25 (+212.5%)
Mutual labels:  makefile
Traj gen vis
auto_chaser project
Stars: ✭ 27 (+237.5%)
Mutual labels:  makefile
Erlang Starter Kit
Provide a basic set of Erlang/OTP tools for development and for testing
Stars: ✭ 23 (+187.5%)
Mutual labels:  makefile
Android device amazon otterx
It's otter.. but better
Stars: ✭ 7 (-12.5%)
Mutual labels:  makefile
Tlsconfigguide
Configuration templates for configuring TLS
Stars: ✭ 23 (+187.5%)
Mutual labels:  makefile
Makefile Template
A generic makefile template
Stars: ✭ 26 (+225%)
Mutual labels:  makefile
Gmf
GFM: One-button to init、build、commit、push and so on. 项目初始化、构建、提交、发布等操作一键即可!
Stars: ✭ 8 (+0%)
Mutual labels:  makefile
Hello
Hello world demonstration for Weblate
Stars: ✭ 7 (-12.5%)
Mutual labels:  makefile
Luvit Docs
Documentation for the luvit api
Stars: ✭ 7 (-12.5%)
Mutual labels:  makefile

#Ti.AppLifecycle

This is a Titanium module for detecting a couple app events.

Thanks to Roamler in Amsterdam for sponsoring and René for patience and support.

A description is available too.

#Events

##paused The user has left the app. I.e. by calling launch screen or starting a new activity from the app.

##resumed The user comes back to the app

##screenoff "The screen is black" (Button Power off, or sleep)

##screenon Screen reopened and app is in foreground again

#TestInterval In order to properly read the paused and resumed events we need a TestInterval as Android does not provide an event for this. A good TestInterval would be 200-500ms. If the testInterval is too long it might not be able to trigger an event as the app is already paused at that stage.

You can specify the test interval (in ms) in tiapp.xml:

<property name="LIFECYCLE_TESTINTERVAL" type="int">500</property>

##Usage

You have only to include in tiapp.xml:

<module platform="android">de.appwerft.applifecycle</module>

In the app it is not needed to require this module. Just including it in tiapp.xml is enough to get it to work

In the app you will receive the events through Ti.App.addEventListener() as shown below.

["screenon screenoff paused resumed"].split(' ').forEach(function(eventName){
    Ti.App.addEventListener(eventName, function() {
        console.log(arguments[0]);
    });
});

// static pull:
require("de.appwerft.applifecycle").isInForeground();  // true/false

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].