package Ġorg . dsc nit ro ur kel a . ela ichi . di Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Room Ċ import Ġdagger . Module Ċ import Ġdagger . Provides Ċ import Ġdagger . h ilt . Install In Ċ import Ġdagger . h ilt . android . components . Activity Ret ained Component Ċ import Ġdagger . h ilt . android . qual ifiers . ApplicationContext Ċ import Ġdagger . h ilt . android . scopes . Activity Ret ained Scoped Ċ import Ġorg . dsc nit ro ur kel a . ela ichi . R Ċ import Ġorg . dsc nit ro ur kel a . ela ichi . api . database . Mail Database Ċ Ċ @ Module Ċ @ Install In ( Activity Ret ained Component :: class ) Ċ object ĠDatabase Module Ġ{ ĊĊĠĠĠ Ġ@ Activity Ret ained Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Mail Database ( ĊĠĠĠĠĠĠĠ Ġ@ ApplicationContext Ġcontext : ĠContext ĊĠĠĠ Ġ) Ġ= ĠRoom . database Builder ( ĊĠĠĠĠĠĠĠ Ġcontext , ĊĠĠĠĠĠĠĠ ĠMail Database :: class . java , ĊĠĠĠĠĠĠĠ Ġcontext . getString ( R . string . database _ name ) ĊĠĠĠ Ġ). fallback To Dest ruct ive Migration (). build () ĊĊĠĠĠ Ġ@ Activity Ret ained Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Mail Dao ( mail Database : ĠMail Database ) Ġ= Ġmail Database . get Mail Dao () ĊĊĠĠĠ Ġ@ Activity Ret ained Scoped ĊĠĠĠ Ġ@ Provides ĊĠĠĠ Ġfun Ġprovide Parsed Mail Dao ( mail Database : ĠMail Database ) Ġ= ĊĠĠĠĠĠĠĠ Ġmail Database . get Parsed Mail Dao () Ċ }