package Ġhost . exp . exponent . experience Ċ Ċ import Ġcom . facebook . react . bridge . Native Module Ċ import Ġcom . facebook . react . bridge . React ApplicationContext Ċ import Ġex po . modules . adapters . react . React Module Registry Provider Ċ import Ġex po . modules . core . Module Registry Ċ import Ġex po . modules . core . interfaces . Registry Lifecycle Listener Ċ import Ġex po . modules . notifications . notifications . categories . Ex po Notification Categories Module Ċ import Ġex po . modules . notifications . notifications . handling . Notifications Handler Ċ import Ġex po . modules . notifications . notifications . scheduling . Notification Scheduler Ċ import Ġhost . exp . exponent . utils . Scoped Context Ċ import Ġhost . exp . exponent . kernel . Experience Key Ċ import Ġex po . modules . manifest s . core . Manifest Ċ import Ġversion ed . host . exp . exponent . modules . universal .* Ċ import Ġversion ed . host . exp . exponent . modules . universal . notifications . Scoped Server Registration Module Ċ Ċ open Ġclass ĠDet ached Module Registry Adapter ( module Registry Provider : ĠReact Module Registry Provider ) Ġ: ĊĠ ĠEx po Module Registry Adapter ( module Registry Provider ) Ġ{ ĊĊĠ Ġoverride Ġfun Ġcreate Native Modules ( ĊĠĠĠ Ġscoped Context : ĠScoped Context , ĊĠĠĠ Ġexperience Key : ĠExperience Key , ĊĠĠĠ Ġexperience Properties : ĠMap < String , ĠAny >, ĊĠĠĠ Ġmanifest : ĠManifest , ĊĠĠĠ Ġexperience Stable Legacy Id : ĠString , ĊĠĠĠ Ġother Modules : ĠList < Native Module > ĊĠ Ġ): ĠList < Native Module > Ġ{ ĊĠĠĠ Ġval Ġreact ApplicationContext Ġ= Ġscoped Context . context Ġas ĠReact ApplicationContext ĊĊĠĠĠ Ġ// ĠWe Ġonly Ġuse ĠReact Ġapplication Ġcontext , Ġbecause Ġwe 're Ġdet ached Ġ-- Ġno Ġscopes ĊĠĠĠ Ġval Ġmodule Registry Ġ= Ġm Module Registry Provider [ scoped Context ] ĊĊĠĠĠ Ġmodule Registry . register Internal Module ( ĊĠĠĠĠĠ ĠConstants Binding ( ĊĠĠĠĠĠĠĠ Ġscoped Context , ĊĠĠĠĠĠĠĠ Ġexperience Properties , ĊĠĠĠĠĠĠĠ Ġmanifest ĊĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ// ĠOver riding Ġex po - updates ĠUpdates Service ĊĠĠĠ Ġmodule Registry . register Internal Module ( Updates Binding ( scoped Context , Ġexperience Properties )) ĊĊĠĠĠ Ġ// ĠReact Adapter Package Ġrequires ĠReact Context ĊĠĠĠ Ġval Ġreact Context Ġ= Ġscoped Context . context Ġas ĠReact ApplicationContext ĊĠĠĠ Ġfor Ġ( internal Module Ġin Ġm React Adapter Package . create Internal Modules ( react Context )) Ġ{ ĊĠĠĠĠĠ Ġmodule Registry . register Internal Module ( internal Module ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ// ĠOver riding ĠScoped UI Manager Module Wrapper Ġfrom ĠReact Adapter Package ĊĠĠĠ Ġmodule Registry . register Internal Module ( Scoped UI Manager Module Wrapper ( react Context )) ĊĊĠĠĠ Ġ// ĠOver riding Ġex po - file - system ĠFileSystem Module ĊĠĠĠ Ġmodule Registry . register Exported Module ( Scoped FileSystem Module ( scoped Context )) ĊĊĠĠĠ Ġ// ĠOver riding Ġex po - secure - store ĊĠĠĠ Ġmodule Registry . register Exported Module ( Scoped Secure Store Module ( scoped Context )) ĊĊĠĠĠ Ġ// ĠCert ain Ġnotifications Ġclasses Ġshould Ġshare Ġ` SharedPreferences ` Ġobject Ġwith Ġthe Ġnotifications Ġservices , Ġso Ġwe Ġdon 't Ġwant Ġto Ġuse Ġscoped Ġcontext . ĊĠĠĠ Ġmodule Registry . register Exported Module ( Notification Scheduler ( scoped Context . base Context )) ĊĠĠĠ Ġmodule Registry . register Exported Module ( Ex po Notification Categories Module ( scoped Context . base Context )) ĊĠĠĠ Ġmodule Registry . register Exported Module ( Notifications Handler ( scoped Context . base Context )) ĊĠĠĠ Ġ// ĠWe Ġcon sc iously Ġpass Ġscoped Ġcontext Ġto ĠScoped Server Registration Module ĊĠĠĠ Ġ// Ġso Ġit Ġcan Ġaccess Ġlegacy Ġscoped Ġbacked - up Ġstorage Ġand Ġmigr ates ĊĠĠĠ Ġ// Ġthe Ġlegacy ĠUUID Ġto Ġscoped Ġnon - back ed - up Ġstorage . ĊĠĠĠ Ġmodule Registry . register Exported Module ( Scoped Server Registration Module ( scoped Context )) ĊĊĠĠĠ Ġ// ĠAdding Ġother Ġmodules Ġ( not Ġuniversal ) Ġto Ġmodule Ġregistry Ġas Ġconsumers . ĊĠĠĠ Ġ// ĠIt Ġallows Ġthese Ġmodules Ġto Ġrefer Ġto Ġuniversal Ġmodules . ĊĠĠĠ Ġfor Ġ( other Module Ġin Ġother Modules ) Ġ{ ĊĠĠĠĠĠ Ġif Ġ( other Module Ġis ĠRegistry Lifecycle Listener ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmodule Registry . register Extra Listener ( other Module Ġas ĠRegistry Lifecycle Listener ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġconfigure Module Registry ( module Registry , Ġreact ApplicationContext ) ĊĠĠĠ Ġreturn Ġget Native Modules From Module Registry ( react ApplicationContext , Ġmodule Registry ) ĊĠ Ġ} ĊĊĠ Ġprotected Ġopen Ġfun Ġconfigure Module Registry ( ĊĠĠĠ Ġmodule Registry : ĠModule Registry , ĊĠĠĠ Ġreact Context : ĠReact ApplicationContext ĊĠ Ġ) Ġ{ ĊĠĠĠ Ġ// ĠSub classes Ġmay Ġadd Ġmore Ġmodules Ġhere . ĊĠ Ġ} Ċ } Ċ