mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2026-01-06 08:14:24 +01:00
Migration to new BLEK library (#143)
* Changed view. * Clear messages. * Clear messages. * Add or delete configuration. * Fixed configuration picker. * Edit configuration. * Create new macro. * removed unnecessary resource files. * Fixed running macro command. * Delete macro * Edit macro * Changed to peripheral name. * Show peripheral name. * Fixed Eol tab design. * Removed icon resource * String changes * Removed any permission from home view. * Clear device after disconnection. * 1 line app bar * Changed missing services text. * Throughput service view changes. * Throughput service fixes. * Removed unused resources. * Fixed Health temperature profile. * Show heart rate. * Fixed hrs view. * Show heart rate data from left to right in the chart. * Changed chart color, solid, and scroll to see history. * Horizontal grid hidden, in case needed. * HTS view update * Changed padding. * Removed circular icon background. * Updated Battery level view. * Updated hrs body sensor location. * Moved ui mappers into view. * Updated gls view. * Changed focus color. * Fixed issue with job. * Fixed bps. * Added Blood pressure feature uuid. * Added blood pressure feature data. * Added rscs feature data. * Fixed cscs view. * Show supported features. * Fixed ui * Suspend the service discovery for GLS and CGMS until bonding is completed. * Added suspend on the function level. * Bonding state check only to cgms service * Removed stacktrace print. * Make cgms record available within a scrollable box * Changed to gray color. * removed padding * Fix height for output section. * onExpand click event. * Added todo for 9th item. * Removed unused code block. * When in focus, reduce the hint text alpha value. * Show empty text error. * Clear focus on tap outside. * Add border when focused. * Propagate focus changes. * CGM graph * Added sample of one to many uart configuration database. * Added device and configuration entities. * Fixed issue with only showing last item from the list. * Changed configuration database irrespective of device address. * File rename. * Added last configuration datastore. * Check if configuration name is unique * Removed Macro text. * Included x and y axis data points. * Added channel sounding service uuid. * Upgraded agp version to 2.7. * Added channel sounding manager. * Downgraded datastore preference to 1.1.4. * Changed to nordic colors. * Added ranging permission. * channel sounding repository * channel sounding service data * channel sounding profile * channel sounding profile in viewmodel * channel sounding manager class * channel sounding testing * CS service characteristics * Create bonding before channel sounding connection. * Clean up. * Added LBS profile * Read/write data to LBS * LBS ui events * LBS service * LBS profile * LBS ui * Agp upgrade * Fixed LBS profile * Removed focus * Changed macro size to 9 * Changed macro color * Show macro in bottom sheet * View refactoring * Added Blek dependency * Added utils dependency * rename * Removed unused event * reorganization * uart macro view update * background color update * different color for input and output message type * Changed to uart event * removed duplicate * rename * auto scroll to new record * removed unused dependency * Fixed crash with ChannelSoundingManager injection. * Require bonding only if it has bonding information * Changed disconnection * CGMS graph * changes in the home view * Home view fixes * changed color * Show MacroEol character in the input message. * Home view icon fixes. * Cadence data parser fixes * Fixed CSC settings view. * Fixed rscs view * hiding graphs until its finished * Removed duplicate * Fixed RSCS view * Fixed notification icon * fixed csc module name * Fixed icon cutoff * Fixed CSCDataParser * Fixed CGMS profile * Fixed GLS view * Fixed GLS strings * Fixed HTS view * Fixed HTS view * title change * Added hts timestamp * Deleted verbose text * UART: changed macro/configuration to preset * UART: fixed input text field * UART: removed expandable/collapsable preset * UART: added extra warning to delete action * UART: don't trim message end. * UART: message section * UART: configuration fixed * UART: configuration fixed * Fix crash when disconnecting before MTU change completes * Disabled incomplete PRX profile * Moved non-composable lambdas to parameters * refactoring display text * Fixed channel sounding screen * Disconnect on missing services before navigation * Fixed label name * Tailored disconnection message. * Tailored disconnection message. * Moved profile file to utils * App analytics events and modes * Integrated analytics with the profile actions. * Show only first non-battery service if multiple services are present. * Fixed window insets for camera notch. * Fixed glucose measurement context. * Fixed glucose concentration unit. * Fixed duplicate analytics update. * rename * refactoring text * Handled disconnecting event. * Replaced with LazyColumn * Fixed window insets * Replaced TitleAppBar with NordicAppBar * Show device address * Show multiple service names if available. * Fixed padding * BPS: Fixed waiting for measurement view. * BPS: view * GLS: Fixed padding * Ui: Fixed dialog * RSCS: fixed distance formatting error * CGMS: ui consistency * DFS: ui fixes * Replaced local scanner with common library scanner. * Fixed padding * reorganization * Removed previous uart module * Text with animated three dots * HTS: text fixes * formatting texts * changed text style * fixed string * Fixed HRS, not completed * DFS: fixed ui * HRS: graph fixes * UART: scroll up when keyboard is visible * Uart input: Add focus * Uart fix: input text field * UART: created rememberImeState * HRS: heart rate ui fixes * profile view scrollable fix * DFS: ui fixes * Fixed logger * Check if the battery characteristics supports NOTIFY or INDICATE property * Dependency update * Changed background color * cleanup * Fixed distance measurement data update. * Filtered devices with testing address * Added preview data * Fixed section view * Fixed elevation view * Removed duplicate views * Fixes control points * String fixes * Elevation view fixes * Range slider view update * Fixed DFS views * Fixed DFS ui * Fixed DFS views * Separated views * Separated profile viewmodel into individual profile view models. * AGP upgrade * Job canceled and make jobs null on clear * Profile name update * Request maximum MTU size only if it is not already set. * Fixed null pointer exception * Battery characteristics read property check * Fixed early mtu request * Removed garbage states * Removed logs * Removed multiple vertical scroll * Fixed padding * Ui fixes * File reorganization * Fixed previous configuration not loading on reconnection * Removed unused files * Dependency update * Renamed module name * Removed unused dependencies * Added param * Removed unused code block * Code optimization * Removed unused file * Readme update * Hide Channel sounding until implementation is complete * Handled initial state closed * revert changes * Added library as module placeholder * Fixed multiple flows for the same peripheral * Request mtu size only when needed * Readme update
This commit is contained in:
@@ -38,6 +38,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":lib_utils"))
|
||||
implementation(platform(libs.firebase.bom))
|
||||
implementation(libs.firebase.analytics)
|
||||
implementation(libs.firebase.crashlytics)
|
||||
|
||||
@@ -31,24 +31,20 @@
|
||||
|
||||
package no.nordicsemi.android.analytics
|
||||
|
||||
enum class Profile(val displayName: String) {
|
||||
BPS("BPS"),
|
||||
CGMS("CGMS"),
|
||||
CSC("CSC"),
|
||||
GLS("GLS"),
|
||||
HRS("HRS"),
|
||||
HTS("HTS"),
|
||||
PRX("PRX"),
|
||||
RSCS("RSCS"),
|
||||
UART("UART");
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the different links that can be used in the application.
|
||||
*/
|
||||
enum class Link(val displayName: String) {
|
||||
DFU("DFU"),
|
||||
LOGGER("LOGGER");
|
||||
LOGGER("LOGGER"),
|
||||
GITHUB("GITHUB"),
|
||||
DEV_ACADEMY("DEV_ACADEMY"),
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents the mode of the UART service.
|
||||
* Used to determine how the UART service should behave.
|
||||
*/
|
||||
enum class UARTMode(val displayName: String) {
|
||||
MACRO("MACRO"),
|
||||
PRESET("PRESET"),
|
||||
TEXT("TEXT")
|
||||
}
|
||||
@@ -32,15 +32,39 @@
|
||||
package no.nordicsemi.android.analytics
|
||||
|
||||
import android.os.Bundle
|
||||
import no.nordicsemi.android.toolbox.lib.utils.Profile
|
||||
|
||||
/**
|
||||
* Base class for Firebase Analytics events.
|
||||
*/
|
||||
sealed class FirebaseEvent(val eventName: String, val params: Bundle?)
|
||||
|
||||
/**
|
||||
* Represents an event that is logged when the app is opened.
|
||||
* This event does not carry any additional parameters.
|
||||
*/
|
||||
data object AppOpenEvent : FirebaseEvent("APP_OPEN", null)
|
||||
|
||||
/**
|
||||
* Represents an event that is logged when profile is opened.
|
||||
* This event can be created with a [Profile] or a [Link].
|
||||
*/
|
||||
class ProfileOpenEvent : FirebaseEvent {
|
||||
|
||||
constructor(profile: Profile) : super(EVENT_NAME, createBundle(profile.displayName))
|
||||
/**
|
||||
* Creates a new instance of [ProfileOpenEvent] with the given profile.
|
||||
* The profile's string representation is used as a parameter.
|
||||
*
|
||||
* @param profile The profile that was opened.
|
||||
*/
|
||||
constructor(profile: Profile) : super(EVENT_NAME, createBundle(profile.toString()))
|
||||
|
||||
/**
|
||||
* Creates a new instance of [ProfileOpenEvent] with the given link.
|
||||
* The link's display name is used as a parameter.
|
||||
*
|
||||
* @param link The link that was opened.
|
||||
*/
|
||||
constructor(link: Link) : super(EVENT_NAME, createBundle(link.displayName))
|
||||
|
||||
companion object {
|
||||
@@ -48,11 +72,12 @@ class ProfileOpenEvent : FirebaseEvent {
|
||||
}
|
||||
}
|
||||
|
||||
class ProfileConnectedEvent : FirebaseEvent {
|
||||
|
||||
constructor(profile: Profile) : super(EVENT_NAME, createBundle(profile.displayName))
|
||||
|
||||
constructor(link: Link) : super(EVENT_NAME, createBundle(link.displayName))
|
||||
/**
|
||||
* Represents an event that is logged when a profile is connected.
|
||||
* This event can be created with a [Profile] or a [Link].
|
||||
*/
|
||||
class ProfileConnectedEvent(profile: Profile) :
|
||||
FirebaseEvent(EVENT_NAME, createBundle(profile.toString())) {
|
||||
|
||||
companion object {
|
||||
private const val EVENT_NAME = "PROFILE_CONNECTED"
|
||||
@@ -61,13 +86,28 @@ class ProfileConnectedEvent : FirebaseEvent {
|
||||
|
||||
const val PROFILE_PARAM_KEY = "PROFILE_NAME"
|
||||
|
||||
/**
|
||||
* Creates a [Bundle] with the given profile name.
|
||||
*
|
||||
* @param name The name of the profile to be included in the bundle.
|
||||
* @return A [Bundle] containing the profile name.
|
||||
*/
|
||||
private fun createBundle(name: String): Bundle {
|
||||
return Bundle().apply { putString(PROFILE_PARAM_KEY, name) }
|
||||
}
|
||||
|
||||
sealed class UARTAnalyticsEvent(eventName: String, params: Bundle?) : FirebaseEvent(eventName, params)
|
||||
/**
|
||||
* Represents an event related to UART (Universal Asynchronous Receiver-Transmitter) analytics.
|
||||
*/
|
||||
sealed class UARTAnalyticsEvent(eventName: String, params: Bundle?) :
|
||||
FirebaseEvent(eventName, params)
|
||||
|
||||
class UARTSendAnalyticsEvent(mode: UARTMode) : UARTAnalyticsEvent("UART_SEND_EVENT", createParams(mode)) {
|
||||
/**
|
||||
* Represents an event that is logged when a UART message is send or received.
|
||||
* This event can be created with a [UARTMode].
|
||||
*/
|
||||
class UARTSendAnalyticsEvent(mode: UARTMode) :
|
||||
UARTAnalyticsEvent("UART_SEND_EVENT", createParams(mode)) {
|
||||
|
||||
companion object {
|
||||
fun createParams(mode: UARTMode) = Bundle().apply {
|
||||
@@ -76,6 +116,14 @@ class UARTSendAnalyticsEvent(mode: UARTMode) : UARTAnalyticsEvent("UART_SEND_EVE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an event that is logged when a UART preset configuration is created.
|
||||
* This event can be created with a [UARTMode].
|
||||
*/
|
||||
class UARTCreateConfiguration : UARTAnalyticsEvent("UART_CREATE_CONF", null)
|
||||
|
||||
/**
|
||||
* Represents an event that is logged when a UART preset configuration is changed.
|
||||
* This event does not carry any additional parameters.
|
||||
*/
|
||||
class UARTChangeConfiguration : UARTAnalyticsEvent("UART_CHANGE_CONF", null)
|
||||
|
||||
Reference in New Issue
Block a user