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.

Thanks.



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"
        android:layout_width="wrap_content"
        android:id="@+id/mMenuKCMcom"
        android:paddingTop="20px"
        android:paddingBottom="20px"
        android:textSize="28px"
        android:layout_marginTop="20px"
        android:layout_marginBottom="20px"
        android:layout_marginLeft="70px"
        android:layout_marginRight="70px"
        android:text="@string/kcmDotCom"/>

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).

v.getBackground().setColorFilter(Color.parseColor("#DDDDDD"),
PorterDuff.Mode.DST);

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

Any advice???

Mark

-- 

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?
i.e.:

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"
src="9278a6f3de5f9e54f2aeeb74ac1f0a7eembedcompiled__en.js"></script>)

Do I then follow with XmlPullParserFactgory parserCreator =
XmlPullParserFactory.newInstance();
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 android-developers@googlegroups.com - 25 Messages in 15 Topics

6. local and remote database synchronization

7. Disable "open" button after programmatic install?