Skip to content

Commit

Permalink
Merge pull request #88 from MuindiStephen/IoT-realtime-data
Browse files Browse the repository at this point in the history
Io t realtime data
  • Loading branch information
MuindiStephen authored Nov 6, 2024
2 parents e24ed11 + b5d2776 commit df4142c
Show file tree
Hide file tree
Showing 37 changed files with 928 additions and 269 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 17 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ plugins {

android {
namespace 'com.steve_md.smartmkulima'
compileSdk 34
compileSdk 35

defaultConfig {
applicationId "com.steve_md.smartmkulima"
minSdk 23
targetSdk 34
targetSdk 35
versionCode 2
versionName "1.0"

Expand Down Expand Up @@ -54,17 +54,17 @@ android {
dependencies {

implementation 'androidx.legacy:legacy-support-v13:1.0.0'
implementation 'com.google.firebase:firebase-auth-ktx:23.0.0'
implementation 'com.google.firebase:firebase-auth-ktx:23.1.0'
implementation 'com.google.firebase:firebase-database-ktx:21.0.0'
implementation 'com.google.firebase:firebase-storage-ktx:21.0.1'
implementation 'com.google.firebase:firebase-firestore-ktx:25.1.0'
implementation 'androidx.activity:activity:1.9.2'
implementation 'com.google.firebase:firebase-firestore-ktx:25.1.1'
implementation 'androidx.activity:activity-ktx:1.9.3'
def timber_version = "5.0.1"
def room_version = "2.6.1"


// Ktx
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.core:core-ktx:1.15.0'

// AppCompat
implementation 'androidx.appcompat:appcompat:1.7.0'
Expand All @@ -73,7 +73,7 @@ dependencies {
implementation 'com.google.android.material:material:1.12.0'

// Constraint Layout
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'

// Testing
testImplementation 'junit:junit:4.13.2'
Expand All @@ -91,15 +91,15 @@ dependencies {
debugImplementation "androidx.fragment:fragment-testing:$fragment_testing"

// Navigation Components
implementation("androidx.navigation:navigation-fragment-ktx:2.8.2")
implementation("androidx.navigation:navigation-ui-ktx:2.8.2")
implementation("androidx.navigation:navigation-fragment-ktx:2.8.3")
implementation("androidx.navigation:navigation-ui-ktx:2.8.3")


// Alternatively - just LiveData
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.6")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.8.7")

// Alternatively - just ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.6")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.7")

// Dagger - Hilt
implementation 'com.google.dagger:hilt-android:2.51.1'
Expand All @@ -116,7 +116,7 @@ dependencies {

// Retrofit
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.1'
implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.6'

// Gson
implementation 'com.google.code.gson:gson:2.10.1'
Expand Down Expand Up @@ -163,7 +163,7 @@ dependencies {
// Barcode scanner
implementation 'com.journeyapps:zxing-android-embedded:4.3.0'

implementation 'com.google.maps.android:android-maps-utils:1.1.0'
implementation 'com.google.maps.android:android-maps-utils:2.3.0'

// Print service
implementation files("libs/nexgo-smartpos-sdk-v3.0.3.aar") // nexgen printer - nexg
Expand All @@ -185,8 +185,11 @@ dependencies {
implementation("com.google.android.play:app-update-ktx:2.1.0")

// Google Firebase Analytics
implementation(platform("com.google.firebase:firebase-bom:33.4.0"))
implementation(platform("com.google.firebase:firebase-bom:33.5.1"))
implementation("com.google.firebase:firebase-analytics")

// MP-Android-Chart
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
// Allow references to generated code
kapt {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package com.steve_md.smartmkulima.model

/**
* Model to map farm conditions data values.
*/
data class FarmConditions(
val temperature: Double,
val humidity: Double,
Expand All @@ -8,5 +11,6 @@ data class FarmConditions(
val precipitation: Double,
val lightDensity: Double,
val nbkLevel: Double,
val soilPh: Double
val soilPh: Double,
val soilTemperature: Double
)
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.steve_md.smartmkulima.data.room.AppDatabase
import com.steve_md.smartmkulima.data.room.TransactionDao
import com.steve_md.smartmkulima.databinding.FragmentApplyInsuranceBinding
import com.steve_md.smartmkulima.utils.displaySnackBar
import com.steve_md.smartmkulima.utils.showBottomSheetDialog
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
Expand Down Expand Up @@ -79,7 +80,12 @@ class ApplyInsuranceFragment : Fragment() {
private fun setUpBinding() {
binding.apply {
cardView11.setOnClickListener {
findNavController().navigate(R.id.action_applyInsuranceFragment_to_payInsuranceModalBottomSheet)
findNavController().navigate(R.id.action_applyInsuranceFragment_to_payInsuranceModalBottomSheet)
// showBottomSheetDialog (
// layout = R.layout.modal_bottom_sheet_payment_option,
// fullScreen = true,
// expand = true
// )
}
imageView3.setOnClickListener {
findNavController().navigateUp()
Expand Down
Loading

0 comments on commit df4142c

Please sign in to comment.