2018-09-13-release-0.23.markdown (3520B)
layout: post title: "🎉 Release: Android Components 0.23" date: 2018-09-13 17:00:00 +0200 categories: releases author: csadilek
News
- More kudos to the application-services team for introducing the new sync-logins component and sample app.
Changelog
- Compiled against:
* Android * SDK: 27 * Support Libraries: 27.1.1 * Kotlin * Standard library: 1.2.61 * Coroutines: 0.23.4 * GeckoView * Nightly: 64.0.20180905100117 🔺 * Beta: 63.0b3 (0269319281578bff4e01d77a21350bf91ba08620) 🔺 * Release: 62.0 (9cbae12a3fff404ed2c12070ad475424d0ae869f) 🔺
- Added initial documentation for the browser-session component: https://github.com/mozilla-mobile/android-components/blob/main/components/browser/session/README.md
- sync-logins: New component for integrating with Firefox Sync (for Logins). A sample app showcasing this new functionality can be found at: https://github.com/mozilla-mobile/android-components/tree/main/samples/sync-logins
- browser-engine-*:
* Added support for fullscreen mode and the ability to exit it programmatically if needed.
`Kotlin
session.register(object : Session.Observer {
fun onFullScreenChange(enabled: Boolean) {
if (enabled) {
// ..
sessionManager.getEngineSession().exitFullScreenMode()
}
}
})
`
- concept-engine, browser-engine-system, browser-engine-gecko(-beta/nightly):
* We've extended support for intercepting requests to also include intercepting of errors
`Kotlin
val interceptor = object : RequestInterceptor {
override fun onErrorRequest(
session: EngineSession,
errorCode: Int,
uri: String?
) {
engineSession.loadData("<html><body>Couldn't load $uri!</body></html>")
}
}
// GeckoEngine (beta/nightly) and SystemEngine support request interceptors.
GeckoEngine(runtime, DefaultSettings(requestInterceptor = interceptor))
`
- browser-engine-system:
* Added functionality to clear all browsing data
`Kotlin
sessionManager.getEngineSession().clearData()
`
* onNavigationStateChange is now called earlier (when the title of a web page is available) to allow for faster toolbar updates.
- feature-session: Added support for processing
ACTION_SENDintents (ACTION_VIEWwas already supported)
`Kotlin
// Triggering a search if the provided EXTRA_TEXT is not a URL
val searchHandler: TextSearchHandler = { searchTerm, session ->
searchUseCases.defaultSearch.invoke(searchTerm, session)
}
// Handles both ACTIONVIEW and ACTIONSEND intents
val intentProcessor = SessionIntentProcessor(
sessionUseCases, sessionManager, textSearchHandler = searchHandler
)
intentProcessor.process(intent)
`
- Replaced some miscellaneous uses of Java 8
forEachwith Kotlin's for consistency and backward-compatibility. - Various bug fixes (see Commits for details).