Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6830] iOS: Create a function to keep the date-time of the last activity on the events

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionWon't Fix
Resolution Date2011-12-22T16:23:12.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterMauro Parra-Miranda
AssigneeStephen Tramer
Created2011-12-21T14:26:43.000+0000
Updated2017-03-09T23:09:38.000+0000

Description

PROBLEM DESCRIPTION

Customer wants to have a function that keeps the track of the last touch event related to UI, so they can run a custom function when that happens. This is needed in order to run a logout function in the app, in case of the app not being used by certain period of time.

EXTRA INFO

This function is something that can be used by many of our enterprise customers having similar issues.

WORKAROUND

The suggested workaround to the customer was to keep a var in the Ti.App.Properties with the date/time of the last event related to UI. They understand the workaround, but they want this kind of general tracking handed by ourselves.

Comments

  1. Stephen Tramer 2011-12-22

    After some cross-platform discussion, we've determined that this information is unnecessary to be part of an event. After all, it's always possible to do this:
       proxy.addEventListener('whatever', function() {
         var timestamp = new Date();
         // ... your application logic here ...
       });
       
    Timestamping is not a feature of enough general use to be made available as an intrinsic property on all events. A use case would need to be provided to prove otherwise; as the ticket is described, getting the current timestamp and caching it (to disk, on global scope, in a DB, etc.) is an acceptable solution. The more relevant problem is the lack of the availability of true global scoping on iOS, which will be resolved with the introduction of single-context evaluation.
  2. Lee Morris 2017-03-09

    Closing ticket as the issue will not fix.

JSON Source