Skip to content

Commit

Permalink
fix(android): set bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
gronxb committed Jan 16, 2025
1 parent 5325c89 commit 319ec31
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ class HotUpdater : ReactPackage {
putString("HotUpdaterBundleURL", bundleURL)
apply()
}
val reactIntegrationManager = ReactIntegrationManager(context)

val activity: Activity? = getCurrentActivity(context)
val reactApplication: ReactApplication = reactIntegrationManager.getReactApplication(activity?.application)
val bundleURL = getJSBundleFile(context)

reactIntegrationManager.setJSBundle(reactApplication, bundleURL)
}

private fun extractZipFileAtPath(
Expand Down Expand Up @@ -94,8 +101,10 @@ class HotUpdater : ReactPackage {

fun reload(context: Context) {
val activity: Activity? = getCurrentActivity(context)

val reactIntegrationManager = ReactIntegrationManager(context)

val activity: Activity? = getCurrentActivity(context)
val reactApplication: ReactApplication = reactIntegrationManager.getReactApplication(activity?.application)
val bundleURL = getJSBundleFile(context)

Expand Down

0 comments on commit 319ec31

Please sign in to comment.