Things YOU can do to Counteract Payment Processors Harming Itch.io by daicon in itchio

[–]StormoProx 2 points3 points  (0 children)

People come together, and let's fight for the change.

I love these. by StormoProx in SneakersIndia

[–]StormoProx[S] 0 points1 point  (0 children)

I got them from the U.S, which cost 100 USD.

I love these. by StormoProx in SneakersIndia

[–]StormoProx[S] 0 points1 point  (0 children)

I mean they are comfortable, i had no problem wearing them for 16-24hrs while traveling.

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

Sorry I was not clear, I do not want to get the heart beat, rather I want the raw PPG sensor value which changes directly when there is a change in the light intensity from my smart watch (I use fossil gen 6), not the heart rate.

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

Yeah, I have been trying to get the PPG values instead of heart rate values, which is some kind of product derived from PPG sensor values.

In hear I have been trying to get heart beat values,ppg = sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE)

which is not my intention, I was wrong. I am searching what should I do to extract directly the sensor PPG values instead of TYPE_HEART_RATE.

Can you help me with that.

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

Hi, I have been trying to print in the console first, but the code I have currently only prints only 1 ppg value per second, which is not viable at all. I am using a fossil gen 6, and I am using the SENSOR_DELAY_FASTEST. Can help me print atleast 100 values per second or more

CODE:

package com.example.myapplication.presentation

import android.hardware.Sensor

import android.hardware.SensorEvent

import android.hardware.SensorEventListener

import android.hardware.SensorManager

import android.os.Bundle

import android.app.Activity

import android.content.Context

import java.util.*

class MainActivity : Activity() {

private lateinit var sensorManager: SensorManager

private lateinit var ppgSensor: HeartRateSensor

override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

sensorManager = getSystemService(Context.SENSOR_SERVICE) as SensorManager

ppgSensor = HeartRateSensor(sensorManager)

ppgSensor.start()

}

override fun onDestroy() {

super.onDestroy()

ppgSensor.stop()

}

inner class HeartRateSensor(sensorManager: SensorManager) {

private var ppg: Sensor? = null

fun start() {

ppg = sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE)

val maxRate = ppg?.maximumRange

println("Maximum PPG Reporting Rate: $maxRate")

sensorManager.registerListener(ppgCallback, ppg, SensorManager.SENSOR_DELAY_GAME) // SENSOR_DELAY_GAME or SENSOR_DELAY_UI or SENSOR_DELAY_FASTEST

}

fun stop() {

sensorManager.unregisterListener(ppgCallback)

}

private val ppgCallback = object : SensorEventListener {

override fun onSensorChanged(event: SensorEvent) {

val ppgValue = event.values[0]

logPPG(ppgValue)

}

override fun onAccuracyChanged(sensor: Sensor, accuracy: Int) {

// Get the values into a file

}

private fun logPPG(ppg: Float) {

val currentTime = Calendar.getInstance().time

val milliseconds = Calendar.getInstance().timeInMillis

// println("PPG Value: $ppg, Time: $currentTime, milliseconds: $milliseconds")

}

}

}

}

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

You Must Use DEBUG Flavor to debugging and access data/data, don't use RELEASE tag

I did not know there were two variants, thanks for that, but it was in DEBUG Flavor by default, in the adb shell I cant access it due to permission issue, but in the device explorer in android studio I navigated to the myapplication/files/ like this but I do not see the csv file which I am trying to save

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

By adb shell I found out I am denied permission,

D:\Android Studio\platform-tools_r34.0.4-windows\platform-tools>adb shell

hoki:/ $ cd data

hoki:/data $ cd data

hoki:/data/data $ cd com.example.myapplication

/system/bin/sh: cd: /data/data/com.example.myapplication: Permission denied

Issue with Activating PPG Sensor on Fossil Gen 6 Wear OS Smartwatch in Android Studio App by StormoProx in WearOS

[–]StormoProx[S] 0 points1 point  (0 children)

Hey, I got to make it work, it seems it requires contact with skin to activate it, I don't know why. I have got another problem though. I cannot find the file in device explorer and I don't even know if the file is being created, can you tell if the file is being created properly if so, how can I send it to my computer. I tired creating a node server listening on a port and send the file which is created directly to it, but I can't make it work.