package Ġcom . example . users data application Ċ Ċ import Ġandroid . os . Bundle Ċ import Ġandroid . os . Environment Ċ import Ġandroid . text . method . Scrolling Movement Method Ċ import Ġandroidx . appcompat . app . AppCompatActivity Ċ import Ġcom . example . users data application . databinding . File Activity Binding Ċ Ċ class ĠFile Activity : ĠAppCompatActivity () Ġ{ ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġbinding : ĠFile Activity Binding ĊĊĠĠĠ Ġoverride Ġfun ĠonCreate ( savedInstanceState : ĠBundle ? ){ ĊĠĠĠĠĠĠĠ Ġsuper . onCreate ( savedInstanceState ) ĊĊĠĠĠĠĠĠĠ Ġbinding Ġ= ĠFile Activity Binding . inflate ( layout Inflater ) ĊĠĠĠĠĠĠĠ ĠsetContentView ( binding . root ) ĊĊĠĠĠĠĠĠĠ Ġval ĠfilePath Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠEnvironment . get External Storage Public Directory ( Environment . DIRECTORY _ DOWNLOAD S ). path ĊĠĠĠĠĠĠĠ Ġval Ġassets FilePath Ġ= Ġfiles Dir . path ĊĠĠĠĠĠĠĠ Ġval Ġexample Ġ= Ġ" Bo as ĠFrom ĠJNI " ĊĠĠĠĠĠĠĠ Ġbinding . readFile TextView . text Ġ= Ġexample ĊĠĠĠĠĠĠĠ Ġbinding . readFile TextView . movement Method = ĠScroll ing Movement Method () ĊĠĠĠĠĠĠĠ Ġbinding . read Button . setOnClickListener Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġbinding . readFile TextView . text Ġ= ĠreadFile Text ( filePath ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġexternal Ġfun ĠreadFile Text ( path : ĠString ): String Ċ Ċ }