Settings in app

Hi again Makeroid Community,

So I’m developping an app, and I wanted to add a “night mode” and “light mode”.
In order to do this I worked with the storage, as you can see.

(Screen1 is my launch screen)
Switch

(Accueil is the screen where the switch is located and also the menu screen)

But I would like to know if there was a better alternative ? Like a settings menu or something like that.
Because with this method, the application is forced to request access to the storage, which may bother some.

To briefly explain how this works :slight_smile:

With a switch, the user can choose to activate or deactivate the mode.
When the mode is activated, the application creates a .txt file and launch the first screen(Screen1), in order to apply the changements…

As a result, each time we change screen, the application checks if the file is there and applies accordingly the orders given by the blocks.
When the mode is deactivated, the application delete this file, relaunch the screen, and everything goes back to what it was.

I don’t know if my English and explanations where good enough (I’m French) and I’m sorry if it’s not the case.
Hope I can get advices from you !

1 Like

The only other way is to use the tinydb to store variables but that will need storage permission too.
Another solution would be using fiebase storage but that will obviosuly need internet access

1 Like

Yes, but the problem with “tinydb” is that the storage is temporary.
What I mean by that is that the parameters will be reset to 0 if the application is restarted, which I don’t want.
While there, the setting is stored on the phone itself, so the user does not need to change mode every time, it is saved.
I thought about firebase too, but the idea is that the application can be used at any time and anywhere…

Non, avec Tiny DB, le stockage est effacé seulement si tu supprime les donnés ou que tu désinstalle l’application :slight_smile:
C’est la meilleure solution pour le stockage je trouve :slight_smile:


No, with Tiny DB, the storage is deleted only if you delete the data or uninstall the application :slight_smile :
This is the best solution for storage I find :slight_smile:

2 Likes

Oh, yeah?! Then I’ll try it then. Thank you very much Franck :slight_smile:

Ah oui ?! Je vais essayer alors dans ce cas. Merci beaucoup Franck :slight_smile:

1 Like