I wanna make a pedometer app. But I don't know already how can i save or store step numbers for each day or each month.
Thanks for your help now.
I wanna make a pedometer app. But I don't know already how can i save or store step numbers for each day or each month.
Thanks for your help now.
Use SharedPreferences to save data:
SharedPreferences sharedPreferences = getSharedPreferences("MyData", Context.MODE_PRIVATE);
SharedPreferences.Editor editor = sharedPreferences.edit();
//for save data
editor.putString("yourDay", yourData);
//for get data
sharedPreferences.getString("yourDay", "yourDefaultData");
It is saved on SharePreference folder into your app data folder, and you can always access to it just using the same name when you instantiate your SharedPreference.
If you're looking to use a database to store the data locally (as in not through a web service) then start here: http://developer.android.com/training/basics/data-storage/databases.html