Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Silvi Vladi
StayFitApplication_Tutorial
Commits
4b3528fd
Commit
4b3528fd
authored
May 02, 2021
by
sivl0509
Browse files
delete additional functions
parent
5bbdf2db
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/example/stayfitapplication/model/Sensors.kt
View file @
4b3528fd
...
...
@@ -6,38 +6,5 @@ import android.hardware.SensorEvent
import
android.hardware.SensorEventListener
import
android.hardware.SensorManager
class
Sensors
:
SensorEventListener
{
private
lateinit
var
mSensorManager
:
SensorManager
private
var
mHeartRateSensor
:
Sensor
?
=
null
private
var
mStepCounterSensor
:
Sensor
?
=
null
private
var
mStepDetectorSensor
:
Sensor
?
=
null
private
lateinit
var
mSensorDataListener
:
SensorDataListener
override
fun
onAccuracyChanged
(
sensor
:
Sensor
?,
accuracy
:
Int
)
{
// do nothing
}
override
fun
onSensorChanged
(
event
:
SensorEvent
?)
{
if
(
event
==
null
)
{
return
}
// TODO
}
fun
createSensor
(
context
:
Context
,
sensorDataListener
:
SensorDataListener
)
{
// TODO
}
fun
start
()
{
// TODO
}
fun
stop
()
{
// TODO
}
interface
SensorDataListener
{
// TODO
}
class
Sensors
{
}
\ No newline at end of file
app/src/main/java/com/example/stayfitapplication/viewmodel/SessionViewModel.kt
View file @
4b3528fd
...
...
@@ -12,7 +12,7 @@ import com.example.stayfitapplication.model.repository.SessionRepository
import
java.util.*
import
kotlin.collections.ArrayList
class
SessionViewModel
(
context
:
Context
)
:
ViewModel
()
,
Sensors
.
SensorDataListener
{
class
SessionViewModel
(
context
:
Context
)
:
ViewModel
()
{
private
val
mRepository
:
SessionRepository
by
lazy
{
StayFitApplication
.
repository
}
init
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment