This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApiService { | |
| fun requestDataFromBackend(): Observable<MyRawDataModel> { | |
| return BackendAPI().returnSomeDummyData() | |
| } | |
| fun readCachedUserName(rawDataModel: MyRawDataModel) : Observable<Pair<MyRawDataModel, String>> { | |
| val cachedUserName = PreferenceManager.getDefaultSharedPreferences(MyApplication.INSTANCE).getString("USER_NAME", "") ?: "" | |
| return Observable.just(Pair(rawDataModel, cachedUserName)) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AndroidLifeCycleComponent { | |
| fun start() { | |
| System.out.println("Robot Start") | |
| } | |
| fun resume() { | |
| System.out.println("Robot Resume") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AndroidRobot: BaseLifeCycle() { | |
| fun onCreate() { | |
| start() | |
| } | |
| fun onResume() { | |
| resume() | |
| } |
NewerOlder