Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KDE Connect Android KDE Connect Android
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Bugzilla
    • Bugzilla
  • Merge requests 34
    • Merge requests 34
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • Network
  • KDE Connect AndroidKDE Connect Android
  • Merge requests
  • !226

Open
Created Jan 05, 2021 by Daniel Tang@danieltContributor1 of 3 tasks completed1/3 tasks
  • Report abuse
Report abuse

Draft: Modern Android Development

  • Overview 5
  • Commits 3
  • Changes 412

NOT READY! Highly experimental and doesn't work or compile yet

  • Phase 1: Internal Refactor to clean up the code and enable to use of Kotlin coroutines
  • Phase 2: Move the UI to fragments and data binding instead of the outdated activities
  • Phase 3: Ensure all plugins still work

I will be taking a break for the next month, so this is estimated to be ready around May.

Files that are mostly done and reviewable:

  • core/BackgroundService.kt
  • core/BackgroundWorker.kt
  • device/DeviceRole.kt
  • device/DeviceType.kt
  • net/* except the TODO parts
  • notification/*
  • packet/* (more files might be added)
  • Most files in plugin/
  • util/*

Summary

This MR should bring us up to date with Google's latest tools and recommendations for Android development. It should simplify the codebase and make it easier to work with.

What's planned:

  • Fragments and single-activity instead of the old pattern of multiple activities
    • Navigation component and animation support
  • Reduce code coupling by improving encapsulation
  • Use SAF only
  • Data binding expressions with ViewModel instead of manually controlling the view
  • Kotlin
    • Coroutines instead of threads
  • Config versioning
  • Updated dependencies
  • Reduce boilerplate for backends/plugins
  • LiveData/Observables

What's not planned for the current MR:

  • Jetpack compose
  • Any nontrivial behaviour changes
  • Replacing AppCompat theme with Material design components

Test Plan

  • The code should be more modern and easier to maintain
  • The user should not notice any major difference before and after
Edited Mar 31, 2021 by Daniel Tang
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: modern-android-refactor