Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8730] Android: When invoking other intent from the app, the pause event is not being triggered

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-04-23T15:59:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsSupportTeam, core
ReporterMauro Parra-Miranda
AssigneeAllen Yeung
Created2012-04-13T17:08:07.000+0000
Updated2017-03-10T00:06:02.000+0000

Description

Problem Description

If we call another app or activity in the android app, the pause event is not being fired.

Actual Results

Event is not fired

Expected Results

The event pause should be fired.

Test case

1. Create mobile project. 2. Paste this into the app.js
if(Ti.Platform.osname == 'iphone') { // WORKING FOR iPHONE 
// do nothing
} else { 
	// event listeners for android 
	// NOT WORKING 
	Ti.Android.currentActivity.addEventListener('create',function(){Ti.API.info('Create call')}); 
	Ti.Android.currentActivity.addEventListener('destroy',function(){Ti.API.info('Destroy call')}); 
	Ti.Android.currentActivity.addEventListener('pause',function(){Ti.API.info('Pause call')}); 
	Ti.Android.currentActivity.addEventListener('resume',function(){Ti.API.info('Resume call')}); 
	Ti.Android.currentActivity.addEventListener('start',function(){Ti.API.info('Start call')}); 
	Ti.Android.currentActivity.addEventListener('stop',function(){Ti.API.info('Stop call')}); 
}

Ti.Platform.openURL('tel://911');

Comments

  1. Allen Yeung 2012-04-23

    I tested this in the latest master build and I cannot reproduce. I tried on a galaxy S2 and a 2.2 emulator, and verified that all of the events are fired correctly.
  2. Lee Morris 2017-03-10

    Closing this ticket as the issue cannot be reproduced.

JSON Source