package Ġcom . example . my application Ċ Ċ import Ġio . flutter . embedding . android . Flutter Activity Ċ import Ġio . flutter . embedding . engine . Flutter Engine Ċ import Ġio . flutter . embedding . engine . Flutter Engine Cache Ċ import Ġio . flutter . plugin . common . Method Channel Ċ Ċ class ĠTest Flutter Activity : ĠFlutter Activity () Ġ{ ĊĠĠĠ Ġprivate Ġval Ġchannel Ġ= Ġ" native . app / test " ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġfun Ġwith Cached Engine ( engine Id : ĠString ) Ġ= ĠCustom Cached Engine Intent Builder ( engine Id ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġclass ĠCustom Cached Engine Intent Builder ( engine _ id : ĠString ) Ġ: ĊĠĠĠĠĠĠĠ ĠCached Engine Intent Builder ( Test Flutter Activity :: class . java , Ġengine _ id ) ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure Flutter Engine ( flutter Engine : ĠFlutter Engine ) Ġ{ ĊĠĠĠĠĠĠĠ Ġsuper . configure Flutter Engine ( Flutter Engine Cache . getInstance ()[" any _ engine _ id "] !! ) ĊĠĠĠĠĠĠĠ ĠMethod Channel ( flutter Engine . dart Executor . binary Messenger , Ġchannel ). set MethodCall Handler Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcall , Ġresult Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġif ( call . method Ġ== Ġ" exit Module ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġthis . finish () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} Ġelse Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġresult . not Implemented () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }