Android Shared preferences for creating one time activity

0 votes
I have three actions, A, B, and C, with A and B being forms that must be filled out and the data saved in the database (SQLite). I'm using an intent that goes from A to B, then from B to C. What I want is for C to always be my home screen instead of A and B whenever I start my app.

I suppose shared preferences would be appropriate for this, but I am at a loss for a reasonable beginning point. We would appreciate any assistance.
Nov 4 in Android by Edureka
• 12,390 points
36 views

1 answer to this question.

0 votes

Android offers a variety of options for storing application data. Shared Preferences is the name of one of these methods. Data in the form of a key-value pair can be saved and retrieved using Shared Preferences.

You must use the method getSharedPreferences(), which returns a SharedPreference instance pointing to the file containing the preferences' values, in order to use shared preferences.

SharedPreferences sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);	
answered Nov 8 by Edureka
• 10,880 points

Related Questions In Android

0 votes
0 answers

Android activity life cycle - what are all these methods for?

What is the life cycle of an ...READ MORE

Nov 17 in Android by Edureka
• 12,390 points
14 views
0 votes
0 answers

Android Open External Storage directory(sdcard) for storing file

For programmatic file saving, I want to ...READ MORE

Sep 21 in Android by Edureka
• 12,390 points
74 views
0 votes
1 answer
0 votes
1 answer

How to make android phone flashlight blink?

This might be too fast to blink:- String[] ...READ MORE

answered Jun 6 in Others by nisha
• 2,190 points
157 views
0 votes
1 answer

How to set my Activity as main activity in android?

The "intent-filter" in "AndroidManifest.xml" allows you to ...READ MORE

answered Nov 8 in Android by Edureka
• 12,390 points
36 views
0 votes
1 answer
0 votes
1 answer

Running docker on Android

According to the documentation, the Android kernel is ...READ MORE

answered Aug 1, 2018 in Docker by Kalgi
• 52,350 points
3,028 views
0 votes
1 answer

Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

Go to the gradle.properties file and add ...READ MORE

answered Nov 8 in Android by Edureka
• 10,880 points
43 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP