Recent

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

shyub

  • Jr. Member
  • **
  • Posts: 82
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: 509
  • 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 2.1.0(trunk) FPC 3.3.1(trunk) Ubuntu 20.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.0(stable) Ubuntu 20.10 64b Dark Theme
http://github.com/gcarreno

loaded

  • Full Member
  • ***
  • Posts: 197
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.
Installing the spelling, google translate is used :)

rsu333

  • New Member
  • *
  • Posts: 36
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