Page MenuHomePhabricator

[native] [33/40] RN 0.70: Replace old AndroidLifecycleModule with new Expo one
ClosedPublic

Authored by ashoat on Dec 19 2022, 7:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 6:53 AM
Unknown Object (File)
Wed, Dec 18, 5:04 AM
Unknown Object (File)
Sat, Dec 14, 1:58 PM
Unknown Object (File)
Sat, Dec 14, 1:58 PM
Unknown Object (File)
Sat, Dec 14, 1:57 PM
Unknown Object (File)
Sat, Dec 14, 1:57 PM
Unknown Object (File)
Sat, Dec 14, 1:57 PM
Unknown Object (File)
Sat, Dec 14, 1:57 PM
Subscribers

Details

Summary

Context about this new Expo module in D5932.

Depends on D5933

Test Plan

I patched the following into native/root.react.js:

import * as AndroidLifecycleModule from './lifecycle/lifecycle-module';

if (Platform.OS === 'android') {
  console.log(`androidLifecycle.ACTIVE: ${AndroidLifecycleModule.ACTIVE ?? 'null or undefined'}`);
  console.log(`androidLifecycle.initialStatus: ${AndroidLifecycleModule.initialStatus ?? 'null or undefined'}`);
  addLifecycleListener(status => { console.log(`onChange ${status ?? 'null or undefined'}`) });
}

It resulted in the following output after I started, then backgrounded, and then foregrounded the app:

LOG  androidLifecycle.ACTIVE: active
LOG  androidLifecycle.initialStatus: active
LOG  onChange background
LOG  onChange active

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 7:06 AM
Harbormaster failed remote builds in B14318: Diff 19561!
Harbormaster returned this revision to the author for changes because remote builds failed.Dec 19 2022, 9:11 AM
Harbormaster failed remote builds in B14390: Diff 19639!

Please ignore CI until the end of the stack

This revision is now accepted and ready to land.Dec 19 2022, 12:12 PM