[TIMOB-15324] Android: Expose the status of the current activity (foreground or background) to module developers
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-10-28T21:24:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0 |
Components | Android |
Labels | module_module, qe-testadded |
Reporter | Ping Wang |
Assignee | Ping Wang |
Created | 2013-09-23T23:56:08.000+0000 |
Updated | 2013-11-20T00:08:06.000+0000 |
Description
Cloudpush module wants to know if the current Titanium activity is in the foreground which is between a call to onResume() until a call to onPause().
PR: https://github.com/appcelerator/titanium_mobile/pull/4836 For FR: 1. Create a new module.
2. Add a new method in the module source file test/src/com/appcelerator/test/TestModule.java:
3. Add the above module to a mobile project and paste the below code to app.js.
4. Run the project. Click the button. Should see an alert "foreground: true".
[~pwang] [~hpham] Could you please let me know when and which version of Titanium SDK I can use, that contains this code change? I may want to implement this on ti.cloudpush side earlier.
[~plv], the PR was merged yesterday so it should be in the latest [CI build](http://builds.appcelerator.com.s3.amazonaws.com/index.html#master)