package Ġcom . react native awesome modul ern Ċ Ċ import Ġandroid . content . Intent Ċ import Ġcom . facebook . react . bridge . React ApplicationContext Ċ import Ġcom . facebook . react . bridge . React Context Base Java Module Ċ import Ġcom . facebook . react . bridge . React Method Ċ import Ġcom . facebook . react . bridge . Promise Ċ Ċ class ĠAwesome Module Rn Module ( react Context : ĠReact ApplicationContext ) Ġ: ĠReact Context Base Java Module ( react Context ) Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠgetName (): ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġ" Awesome Module Rn " ĊĠĠĠ Ġ} ĊĊĠ Ġ@ React Method ĊĠ Ġfun Ġshow View ( promise : ĠPromise ) Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent ( react ApplicationContext , ĠModule Name Activity :: class . java ) ĊĠĠĠ Ġintent . add Flags ( Intent . FLAG _ ACTIVITY _ NEW _ TASK ) ĊĠĠĠ Ġreact ApplicationContext . startActivity ( intent ) ĊĠĠĠ Ġpromise . resolve ( true ) ĊĠ Ġ} ĊĊĠ Ġ@ React Method ĊĠ Ġfun Ġshow View Navigate To ( text : ĠString ? Ġ= Ġ"", Ġpromise : ĠPromise ) Ġ{ ĊĠĠĠ Ġval Ġintent Ġ= ĠIntent ( react ApplicationContext , ĠModule Name Activity :: class . java ) ĊĠĠĠ Ġintent . add Flags ( Intent . FLAG _ ACTIVITY _ NEW _ TASK ) ĊĠĠĠ Ġintent . putExtra (" screen Id ", Ġtext ) ĊĠĠĠ Ġreact ApplicationContext . startActivity ( intent ) ĊĠĠĠ Ġpromise . resolve ( true ) ĊĠ Ġ} ĊĊĊ Ċ } Ċ