Open shubhamsinghmutualmobile opened 1 year ago
I would like to work on it.
Sure, please feel free to raise a PR @Chandra-Mauli-Sharma 🌟 You don't need to be assigned to the ticket in order to work on it 👍
If the PR is in a working state, we'll assign this issue to you and merge it ✅
Ok, will start working on it.
The idea is to explore if it is possible to ask for permissions whenever the user starts consuming any sensor state.
If implemented successfully, the developers won't need to write code for asking permissions for the sensors they are using, the library will do it for them 🎉 They will only need to add the
<uses-permission>
tag insideAndroidManifest.xml
for the required permission (check if even that can be avoided with the library's own Manifest file 🤷).For example: Whenever a user starts consuming values from
rememberHeartRateSensorState
, the required permission i.e.android.permission.BODY_SENSORS
should automatically be requested first and only when the user grants it, the state function should start emitting sensor values.TODO
0
for Float andfalse
for Boolean) while the permission is being requestedResources
Permissions required
android.permission.BODY_SENSORS
android.permission.ACTIVITY_RECOGNITION
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/>