Recent

Author Topic: Where to save the settings?  (Read 1270 times)

shyub

  • Full Member
  • ***
  • Posts: 124
Where to save the settings?
« on: March 19, 2021, 08:21:04 pm »
I apologize to everyone for asking questions too often ...
In Windows the program settings are saved in the registry or in the ini-file. How and where to save it in Android?

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: Where to save the settings?
« Reply #1 on: March 19, 2021, 09:20:26 pm »
Hi shyub,

I apologise for not knowing Android, but if FPC/Lazarus gives you a system agnostic set of functions like:

Have you not tested them?

Again, I know nothing of your Android app and I apologise if you already went through these options.

Cheers
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

loaded

  • Hero Member
  • *****
  • Posts: 825
Re: Where to save the settings?
« Reply #2 on: March 19, 2021, 09:45:12 pm »
Hi, The data that will be used throughout the life of the application on Android is stored by SharedPreferences or SQLite method.
In addition, there is another method called PreferenceFragment that makes recording and reading automatically.
In the LAMW installation directory, in the demo folder, there are very good examples of using SQLite. I recommend you to review.
Check out  loaded on Strava
https://www.strava.com/athletes/109391137

rsu333

  • Full Member
  • ***
  • Posts: 110
Re: Where to save the settings?
« Reply #3 on: March 20, 2021, 07:42:11 am »
Anyone's  query /questions are useful to improve other beginners ,same  with you
so need not  apologize .
   

Segator

  • Full Member
  • ***
  • Posts: 168
    • https://github.com/Nenirey
Re: Where to save the settings?
« Reply #4 on: March 20, 2021, 03:57:59 pm »
You can use the jPreference component to save various data types like string, integer and boolean, the data is saved by android, the you can use it again in any moment
i am Reinier, Nenirey and Segator :) https://github.com/Nenirey

 

TinyPortal © 2005-2018