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:
Himali Aryal
2025-07-30 14:51:02 +02:00
committed by GitHub
parent 9a71e66c10
commit b67abd60e6
513 changed files with 19164 additions and 14446 deletions

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest/>

View File

@@ -0,0 +1,14 @@
package no.nordicsemi.android.toolbox.lib.storage
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
@Entity(tableName = "configurations")
data class ConfigurationEntity(
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "_id") val _id: Int?,
@ColumnInfo(name = "name") val name: String,
@ColumnInfo(name = "xml") val xml: String,
@ColumnInfo(name = "deleted", defaultValue = "0") val deleted: Int
)

View File

@@ -0,0 +1,20 @@
package no.nordicsemi.android.toolbox.lib.storage
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import kotlinx.coroutines.flow.Flow
@Dao
interface ConfigurationsDao {
@Query("SELECT * FROM configurations")
fun getAllConfigurations(): Flow<List<ConfigurationEntity>>
@Insert(onConflict = OnConflictStrategy.REPLACE)
suspend fun insertConfiguration(configuration: ConfigurationEntity): Long
@Query("DELETE FROM configurations WHERE name = :configurationName")
suspend fun deleteConfiguration(configurationName: String)
}

View File

@@ -0,0 +1,13 @@
package no.nordicsemi.android.toolbox.lib.storage
import androidx.room.Database
import androidx.room.RoomDatabase
@Database(
entities = [ConfigurationEntity::class],
version = 1,
exportSchema = false
)
internal abstract class ConfigurationDatabase : RoomDatabase() {
abstract fun configurationDao(): ConfigurationsDao
}

View File

@@ -0,0 +1,10 @@
package no.nordicsemi.android.toolbox.lib.storage
import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
val MIGRATION_2_3 = object : Migration(2, 3) {
override fun migrate(db: SupportSQLiteDatabase) {
// Empty implementation, because the schema isn't changing.
}
}

View File

@@ -0,0 +1,20 @@
package no.nordicsemi.android.toolbox.lib.storage.di
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import no.nordicsemi.android.toolbox.lib.storage.ConfigurationDatabase
import no.nordicsemi.android.toolbox.lib.storage.ConfigurationsDao
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
class DaoHiltModule {
@Provides
@Singleton
internal fun provideDeviceDao(db: ConfigurationDatabase): ConfigurationsDao {
return db.configurationDao()
}
}

View File

@@ -0,0 +1,26 @@
package no.nordicsemi.android.toolbox.lib.storage.di
import android.content.Context
import androidx.room.Room
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.android.qualifiers.ApplicationContext
import dagger.hilt.components.SingletonComponent
import no.nordicsemi.android.toolbox.lib.storage.ConfigurationDatabase
import javax.inject.Singleton
@Module
@InstallIn(SingletonComponent::class)
class DbHiltModule {
@Provides
@Singleton
internal fun provideDeviceDB(@ApplicationContext context: Context): ConfigurationDatabase {
return Room.databaseBuilder(
context,
ConfigurationDatabase::class.java,
"toolbox_uart.db"
).build()
}
}