Save contact phone number to file and use it later

Hello, I'm currently developing an app to help blind people, I'm presently stuck because I need to save an emergency contact phone number to a file so that the Blind user only has to select it once. after searching for quite some time I can't find a solution, I would be grateful if someone could help me

Welcome. You could use a TinyDB to store the selected contactdetails. No need to use a file. Is there a special reason you want to save it to a file?

1 Like

not really I'm just new to all of this.
Could you give me an example of what that would look like, please

Here some sample blocks. In the contactpicker.afterpicking the name and number are stored in a TinyDB with the tags Name and Number.

Button1.text gets the text of the contact name.

When you press button1 and the phonenumber is not empty the phonecall is made directly.

The next time you open the app you could get the values from the TinyDB and you just have to press the button.

Remember you can not put an app with the block makephonecalldirect on Google Play. Google won't accept apps making direct calls.

1 Like

thank you so much