History log of /expo/android/expoview/src/main/java/host/exp/exponent/experience/ReactNativeActivity.kt (Results 1 – 23 of 23)
Revision Date Author Comments
# d211fd84 20-Sep-2023 Wojciech Dróżdż <[email protected]>

[android] Remove unnecessary version checks (#24203)

# Why

This PR is related to #24201, it removes unnecessary version checks

# How

Remove version check logic for SDK's < 23

# Test Pla

[android] Remove unnecessary version checks (#24203)

# Why

This PR is related to #24201, it removes unnecessary version checks

# How

Remove version check logic for SDK's < 23

# Test Plan

Tested in Bare Expo in Android 13 simulator

show more ...


# a6a590a2 08-Sep-2023 Kudo Chien <[email protected]>

[go] try to fix android expo go top crash (#24307)

# Why

it turns out #23974 doesn't fix all the call paths to the top one crash. it still happens on expo-go 2.29.6. the stacktrace is slightly di

[go] try to fix android expo go top crash (#24307)

# Why

it turns out #23974 doesn't fix all the call paths to the top one crash. it still happens on expo-go 2.29.6. the stacktrace is slightly different.

# How

prevent crash when the `experienceKey` is null

show more ...


# 9758ecba 17-Aug-2023 Kudo Chien <[email protected]>

[go] fix top crash for android expo-go (#23974)

# Why

try to fix the top crash for android expo-go: https://console.firebase.google.com/project/exponent-5dd6d/crashlytics/app/android:host.exp.exp

[go] fix top crash for android expo-go (#23974)

# Why

try to fix the top crash for android expo-go: https://console.firebase.google.com/project/exponent-5dd6d/crashlytics/app/android:host.exp.exponent/issues/9d584f4d6540e6fccac254f6f72db478

```
Fatal Exception: java.lang.RuntimeException: Unable to resume activity {host.exp.exponent/host.exp.exponent.experience.HomeActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4756)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4788)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2221)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8101)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)

Caused by java.lang.NullPointerException:
at host.exp.exponent.experience.ReactNativeActivity.shouldShowErrorScreen(ReactNativeActivity.kt:517)
at host.exp.exponent.experience.BaseExperienceActivity.consumeErrorQueue$lambda$2(BaseExperienceActivity.kt:140)
at android.app.Activity.runOnUiThread(Activity.java:7146)
at host.exp.exponent.experience.BaseExperienceActivity.consumeErrorQueue(BaseExperienceActivity.kt:135)
at host.exp.exponent.experience.BaseExperienceActivity.onResume(BaseExperienceActivity.kt:49)
at host.exp.exponent.experience.HomeActivity.onResume(HomeActivity.kt:83)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1456)
at android.app.Activity.performResume(Activity.java:8229)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4741)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4788)
at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2221)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:268)
at android.app.ActivityThread.main(ActivityThread.java:8101)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:627)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
```

# How

i cannot reproduce the crash but the `manifestUrl` is null in the `HomeActivity`. not sure if the pr fixes the problem correctly but it would prevent expo-go from crash.

show more ...


# 3218138c 28-Jun-2023 Kudo Chien <[email protected]>

[go] fix network inspector stability on android (#23158)

# Why

fix some stability issues for network inspector on android expo go
close ENG-9111

# How

- disable network inspector when devS

[go] fix network inspector stability on android (#23158)

# Why

fix some stability issues for network inspector on android expo go
close ENG-9111

# How

- disable network inspector when devSupportEnabled=false. this case happens when loading bundles without dev support, e.g. published updates.
- original network inspector is broken on versioned expo go. because we add the okhttp interceptors from unversioned classes, but on **ReactNativeActivity** we use the versioned classes to set the delegate.

# Test Plan

use versioned release expo go to test
- [x] sdk 49 project with network inspector
- [x] sdk 49 published project with network requests -> should not crash
- [x] sdk 48 project with network requests -> should not crash

show more ...


# 60ad5af1 21-Jun-2023 Kudo Chien <[email protected]>

[go] add network inspector support (#22741)

# Why

add network inspector support for expo go
close ENG-8010

# How

integrate the ExpoRequestCdpInterceptor from expo-modules-core. unlike expo

[go] add network inspector support (#22741)

# Why

add network inspector support for expo go
close ENG-8010

# How

integrate the ExpoRequestCdpInterceptor from expo-modules-core. unlike expo-dev-launcher to use hacky solution, we want to enable the network inspector on release mode, so the implementation follows formal way.
- on ios, we leverage the `RCTSetCustomNSURLSessionConfigurationProvider` from react-native to create dedicated `URLSessionConfiguration`.
- on android, we already have a dedicated okhttp client from expo go. this pr just adds the interceptors.
- found image requests are not intercepted, it is because we don't use okhttp for fresco image pipeline. this pr tries to use the okhttp for fresco as react-native.
- android expo go has multiple react instances. however, the network inspector currently only support single inspector target to metro-inspector-proxy. as the result, we only limit the current foreground activity to send network inspector events.

# Test Plan

ncl + expo go to test the network inspector

show more ...


# 0502d1f9 18-May-2023 Tomasz Sapeta <[email protected]>

Remove Amplitude from Expo Go (#22523)


# 506f58dd 06-May-2023 Will Schurman <[email protected]>

[expo-updates][expo-go] Support new SDK version field in new manifests (#22356)


# fd055557 06-Mar-2023 Kudo Chien <[email protected]>

[cli][dev-menu][go] add react devtools (#21462)

# Why

close ENG-7468
close ENG-7469

# How

- [cli] add websocket proxy to forward react-devtools events.
- [cli] add static page for react-d

[cli][dev-menu][go] add react devtools (#21462)

# Why

close ENG-7468
close ENG-7469

# How

- [cli] add websocket proxy to forward react-devtools events.
- [cli] add static page for react-devtools frontend. since react-devtools only ships commonjs format, this pr tries to use jspm to support it on browsers.
- [dev-menu][go] listen `reconnectDevTools` metro websocket event and send `RCTDevMenuShown` to js for app to reconnect devtools websocket

# Test Plan

manual test only. please let me know if there's any proper points to add unit tests

show more ...


# 225bf8fe 17-Feb-2023 Kudo Chien <[email protected]>

[go] disable remote debugging when running on hermes (#21269)

# Why

close ENG-7610

# How

the implementation is slightly different between android and ios. on
ios, we could just disable rem

[go] disable remote debugging when running on hermes (#21269)

# Why

close ENG-7610

# How

the implementation is slightly different between android and ios. on
ios, we could just disable remote debugging when changing to hermes and
enable it when changing back to jsc. however, on android we just disable
remote debugging when running on hermes. this is because the fact of we
have override `EXDevSettings` on ios but no similar stuff on android.

# Test Plan

follow steps on ENG-7610

show more ...


# cfbf2952 21-Sep-2022 Kudo Chien <[email protected]>

[android][ios] Integrate JS inspector on Expo Go (#19175)

# Why

close ENG-4165

# How

- if the underlying js runtime is inspectable, show the dev menu as "Open JS Debugger" and open inspecto

[android][ios] Integrate JS inspector on Expo Go (#19175)

# Why

close ENG-4165

# How

- if the underlying js runtime is inspectable, show the dev menu as "Open JS Debugger" and open inspector provided by expo cli.
- on android, there's a workaround for checking js runtime isInspectable. because react-native doesn't expose the information from jsi runtime to java side, we could only check the underlying js executor name if it's hermes or not.

# Test Plan

- ✅ unversioned android/ios expo go + NCL (remote debugging)
- ✅ unversioned android/ios expo go + NCL jsEngine hermes (js inspector)
- ✅ unversioned android/ios expo go + NCL jsEngine hermes + tunnel (js inspector)

Co-authored-by: Łukasz Kosmaty <[email protected]>

show more ...


# 3ba32fe9 13-Jul-2022 Kudo Chien <[email protected]>

[android] Fix build errors after #18168 removed packages (#18219)

# Why

fix android expo go build errors from #18168 removed some packages

# How

- removed integration code
- port `BundleJS

[android] Fix build errors after #18168 removed packages (#18219)

# Why

fix android expo go build errors from #18168 removed some packages

# How

- removed integration code
- port `BundleJSONConverter` from internal facebook sdk to our code
- add necessary 3rd party sdks to versioned sdk dependencies. that is to make sure sdk 44/45 still works

# Test Plan

- unversioned android expo go + NCL
- versioned android expo go + NCL

show more ...


# 12ef5388 16-Dec-2021 Kudo Chien <[email protected]>

[android] Fix another background task exception (#15591)

# Why

yet another exception specific happen to background task manager, especially switching from background to foreground. the `JSIModule

[android] Fix another background task exception (#15591)

# Why

yet another exception specific happen to background task manager, especially switching from background to foreground. the `JSIModulePackage` is called before the `ReactInstanceManager` attached to `ReactNativeActivity`. in this case, we will get a NPE like this:

```
wn:ReactInstanceManager W Instance detached from instance manager
ExperienceActivity E java.lang.NullPointerException
j E Runtime exception in RNObject when calling method getDevSupportManager: java.lang.NullPointerException: null receiver
System.err W java.lang.reflect.InvocationTargetException
W at java.lang.reflect.Method.invoke(Native Method)
W at com.facebook.react.bridge.DefaultNativeModuleCallExceptionHandler.handleException(DefaultNativeModuleCallExceptionHandler.java:4)
W at com.facebook.react.devsupport.DisabledDevSupportManager.handleException(DisabledDevSupportManager.java:1)
W at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:19)
W at java.lang.Thread.run(Thread.java:920)
W Caused by: com.facebook.react.common.JavascriptException
W at host.exp.exponent.ReactNativeStaticHelpers.handleReactNativeError(ReactNativeStaticHelpers.kt:8)
W ... 5 more
```

fixes #15515

# How

- leverage kotlin nullable for `ReactNativeActivity.devSupportManager`
- backport VersionedUtils changes to versioned code

# Test Plan

- [standalone app] follow #15515 steps
- [versioned expo go] test changed functions from sdk41-44 & unversioned apps
- reload
- toggleElementInspector
- togglePerformanceMonitor
- toggleRemoteJSDebugging


Co-authored-by: Łukasz Kosmaty <[email protected]>
Co-authored-by: Bartłomiej Klocek <[email protected]>

show more ...


# 11a4cdb7 02-Dec-2021 Evan Bacon <[email protected]>

[Expo Go][Android] Add expo-system-ui (#15385)

* Update SystemUIScreen.tsx

* Update ExperiencePackagePicker.kt

* Update Expo Go Android to have a transparent loading view


# dafa60a5 01-Sep-2021 Will Schurman <[email protected]>

[android][expo-manifests] Audit usage of getSDKVersion to ensure lack of requirement (#14237)


# 50661f5c 30-Aug-2021 Will Schurman <[email protected]>

[expo-manifests] Rename RawManifest -> Manifest (#14194)


# 706a476d 26-Aug-2021 Will Schurman <[email protected]>

[expo-updates] Factor out raw manifests into their own package (#14183)


# db33ddbd 19-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize versioned core (#14043)


# 058d2dd0 19-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize RNObject and KernelModule (#14042)


# 094c4ddd 19-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize DI (#14039)


# 88711250 19-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize storage (#14018)


# c10881eb 19-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize various util and other classes (#14014)


# 2de1965a 17-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize utils (#14003)


# 7113164b 09-Aug-2021 Will Schurman <[email protected]>

[android] Kotlinize ReactNativeActivity and ExperienceActivity (#13870)