Selesai

Need some help with persistance on Android

Proyek ini berhasil diselesaikan oleh npispas dengan harga $10 USD dalam sehari.

Dapatkan penawaran gratis untuk proyek seperti ini
Pemberi kerja bekerja
Anggaran Proyek
$10 - $30 USD
Diselesaikan Dalam
1 hari
Total Penawaran
24
Deskripsi Proyek

I need help fixing an issue with persistance in my code. I'm new to Android and I'm guessing have missed something importnat.

I'm trying to preserve user check box selection between sessions in an internal json file:

1. In MainActivity on load I try to read internal [url removed, login to view] file on a phone, if the file does not exist I'm loading a template object from a resource and saving that json as a internal file called items.json. Then I pass my JSON object to [url removed, login to view]

2. Every time I click a check box an item I invoke setOnClickListener in MainViewAdapter.java. I update json object with checked state and I save the json to a [url removed, login to view] internal file.

ISSUE: even though I have no errors and I see the checked state of a json object change when saving, on reload my updates are gone and no longer visible when I re-load the same file I just saved during a previous session.

Missing something simple just can't see it.

Thank you

Diselesaikan oleh:
Keahlian yang Diperlukan

Ingin menghasilkan uang?

  • Atur anggaran Anda dan jangka waktunya
  • Uraikan proposal Anda
  • Dapatkan bayaran atas pekerjaan Anda

Pekerjakan para freelancer yang juga menawar di proyek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online