Yakov
Yakov

Reputation: 318

Android: Read app's settings from the another app

I have two android games, this games store their data (scores, other settings) in the app's settings. I would love to develop an android widget where data from these two games should be shown. So is possible to read app's settings from the other app (in my case from the widget)? How can I do it?

Thanks, Yakov

Upvotes: 1

Views: 1461

Answers (1)

Mohit Deshpande
Mohit Deshpande

Reputation: 55257

Because you developed those two games, it makes using their data so much easier. You have a couple of options now. But for all of those options, I'd recommend enforcing a permission: Security and Permissions so that applications that you don't want accessing your data can't access it. Here are your options:

  1. SharedPreferences but using getSharedPreferences("filename", MODE_WORLD_READABLE);
  2. Internal Storage
  3. External Storage
  4. Database with a Content Provider

Upvotes: 3

Related Questions