Would love to help you
Hi Shuchir, I was looking for something like this and found that you're working on this. I'd love to help you out in any way possible. I have limited experience with android/mobile dev but have good experience with the backend.
Let me know if we can collaborate in any way :)
Hi Kumar!
Right now I'm working on adding two-way support- being able to add records alongside being able to read them. Feel free to make a PR with any updates to this! The database schema is in the readme, and the library that is being used for health-connect on the companion app is react-native-health-connect
I self hosted the server with my own appwrite project. But looks like the data is encrypted:
Example:
gAAAAABk6PtUYX3kQy37vlgcU7zaWSBvWPALTNt9QK2DPodsZWNrPqA5I4_T_QPt1zW1_7xg8TvQsdDTgast91yw-NTXisV8vWkwSwf3TBcnu0-0RvroNZZg2jhMkbpmd7ODmelUV2qRjsSGiQ1n0Vz7a-d5yromd-Ke7QEuzb4moQ71qKZ6b9qTgn3J8dOlQCeLhyxdJdYgNQ235cpDEE-V1psfb43Vlg==
Any idea how to decrypt/decode this? It's not b64 (judging base on https://www.base64decode.org/)
sorry for the late reply but this should work-
from appwrite.client import Client
from appwrite.query import Query
from appwrite.services.users import Users
from cryptography.fernet import Fernet
import base64
client = (Client()
.set_endpoint(f'{os.environ["APPWRITE_HOST"]}/v1')
.set_project(os.environ['APPWRITE_ID'])
.set_key(os.environ['APPWRITE_KEY']))
users = Users(client)
username = "ENTER_HERE"
allusers = users.list(queries=[Query.equal('name', username)])['users']
user = allusers[0]
hashed_password = user['password']
key = base64.urlsafe_b64encode(hashed_password.encode("utf-8").ljust(32)[:32])
fernet = Fernet(key)
decrypted_data = fernet.decrypt(data.encode()).decode()
where data is that string and decrypted_data is the result