How to store and retrieve email id and password using SharedPreferences?

by pranav09 » Wed, 20 Jan 2010 02:07:51 GMT

Sponsored Links
 Hi all,

I am developing an application which requires to store email id and
password, so that the user can directly redirect to his home page if
the user is already exists. A few day ago i read that
SharedPreferences is used for storing and retrieving the data.

How can i use SharedPreferences concept to store and retrieve data.
Anybody have any idea to do this way? If it is possible by
understanding me through the code because i read that things but i can
not get it properly.


Other Threads

1. Layout Buttons dark and have no gradient on DroidX

I developed a simple app on my Droid (os v2.2.2).  The homepage layout
has 4 buttons on it that display the default gradient gray
background.  Everything looks great.  When I install the app on any of
our in-office Motorola DroidX phones (os v2.2 and v2.2.1), the buttons
are dark with no gradient.

The buttons are defined as follows:

    <Button android:layout_height="wrap_content"

I've combed the forums, created a new hello world default project and
added a single button to confirm that it wasn't something goofy I did
in my app, and even tried manually setting the background color of the
button (see below).


Everything always looks great on the Droid, but all buttons look dark
and lack gradient on the DroidX phones.

Any advice???



2. Parsing data from a calender on a website

I am fairly new to Android, but have some experience reading and
understanding code, including Java.
My question is: If I want to parse a URL such as a calender from a web
page, how do I go about this?

My thoughts: To pull the XML, do I use text?

try {
URL text = new URL( http:// and here is where I am not sure what to
have. The script below is the source for the calender in the XML of
the website
<script type="text/javascript"

Do I then follow with XmlPullParserFactgory parserCreator =
XmlPullParser parser = parserCreator.newPullParser();

parser.setInput(text.openStream(), null);  Do I still use an open
stream here?

rest of code.......

Thanks in advance for the help and insoght


3. 8 juta pilih tablet mana yah? ipad2, xoom or new SG Tab

4. Smooth transition between scroll and fling

5. Digest for - 25 Messages in 15 Topics

6. local and remote database synchronization

7. Disable "open" button after programmatic install?