// ĠCopyright Ġ 2 0 1 4 ĠThe ĠFlutter ĠAuthors . ĠAll Ġrights Ġreserved . Ċ // ĠUse Ġof Ġthis Ġsource Ġcode Ġis Ġgoverned Ġby Ġa ĠBSD - style Ġlicense Ġthat Ġcan Ġbe Ċ // Ġfound Ġin Ġthe ĠLICENSE Ġfile . Ċ Ċ package Ġcom . example . platform _ channels _ benchmarks Ċ Ċ import Ġio . flutter . embedding . android . Flutter Activity Ċ import Ġio . flutter . embedding . engine . Flutter Engine Ċ import Ġio . flutter . plugin . common . Basic Message Channel Ċ import Ġio . flutter . plugin . common . Binary Codec Ċ import Ġio . flutter . plugin . common . Standard Message Codec Ċ import Ġjava . nio . ByteBuffer Ċ Ċ class ĠMainActivity : ĠFlutter Activity () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġconfigure Flutter Engine ( flutter Engine : ĠFlutter Engine ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbasic Standard Ġ= ĠBasic Message Channel ( flutter Engine . dart Executor , Ġ" dev . flutter . echo . basic . standard ", ĠStandard Message Codec . INSTANCE ) ĊĠĠĠĠĠĠĠ Ġbasic Standard . setMessage Handler Ġ{ Ġmessage , Ġreply Ġ-> Ġreply . reply ( message ) Ġ} ĊĠĠĠĠĠĠĠ Ġval Ġbasic Binary Ġ= ĠBasic Message Channel ( flutter Engine . dart Executor , Ġ" dev . flutter . echo . basic . binary ", ĠBinary Codec . INSTANCE ) ĊĠĠĠĠĠĠĠ Ġbasic Binary . setMessage Handler Ġ{ Ġmessage , Ġreply Ġ-> Ġrun Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġresult Ġ= ĠByteBuffer . allocate Direct ( message !!. capacity ()) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġresult . put ( message ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreply . reply ( result ) ĊĠĠĠĠĠĠĠ Ġ} Ġ} ĊĠĠĠĠĠĠĠ Ġsuper . configure Flutter Engine ( flutter Engine ) ĊĠĠĠ Ġ} Ċ } Ċ