Ömer Baykal
Ömer Baykal

Reputation: 85

android save user preferences permanently?

I am developing a game. I want the user of game to determine the opponents usernames. How can I store these names internally?? I want to store them permanently. Not until the end of the run of application.

Upvotes: 0

Views: 2000

Answers (3)

Giohji
Giohji

Reputation: 773

You can check the Android Dev site, http://developer.android.com/guide/topics/data/data-storage.html has some good solutions.

Upvotes: 2

Will Tate
Will Tate

Reputation: 33509

You will want to use Preferences

Here is a good tutorial to get you started: http://www.kaloer.com/android-preferences

Upvotes: 1

Ted Hopp
Ted Hopp

Reputation: 234795

There are several methods. Take a look at the developer guide topic Data Storage. Your options include:

  1. Shared preferences
  2. Internal storage
  3. External storage (e.g., sd card)
  4. SQLite data base
  5. A network connection to a server

Upvotes: 6

Related Questions