AndroidX Core 1.19 folds the core-ktx artifact into core, so drop the androidx-core-ktx catalog alias and move consumers from libs.androidx.core.ktx to libs.androidx.core. Differential Revision: https://phabricator.services.mozilla.com/D309650
android-components > Feature > Example
A sample feature component demonstrating the structure and conventions for creating Android Components modules.
Usage
Setting up the dependency
Use Gradle to download the library from maven.mozilla.org:
implementation "org.mozilla.components:feature-example:{latest-version}"
ExampleFeature
ExampleFeature demonstrates a lifecycle-aware feature component that can be integrated with Android Activities or Fragments.
val feature = ExampleFeature { message ->
Log.d("Example", message)
}
// Bind to lifecycle
lifecycle.addObserver(feature)
// Or manually control
feature.start()
feature.stop()
// Process data
val result = feature.processData("input")
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/