Avatar of Sreejith22
Sreejith22Flag for India

asked on 

Retrieve pre-registered e-mail account information in android

Hello experts,

I would like to have a screen which displays all the pre-registered e-mail accounts in an android device.

If in my device, I have pre-registered account with, say, 3 service providers(Google, Yahoo, Rediff), the screen should show these three service providers name.

When I select a particular service provider, I should be prompted to enter the login credentials of the selected provider. If the credentials match the selected pre-registered acoount, a "Success" toast need to be displayed.

I just need the basic code to kick start this; ie; (i)the code to fetch the pre-registered service providers names and (ii) how the username / password gets verified when you enter the details.

Any help in this regard would be well appreciated with points for sure.

Looking forward for your valuable support.

Best Regards,
Sree
AndroidJava

Avatar of undefined
Last Comment
Sreejith22
Avatar of for_yan
for_yan
Flag of United States of America image



Frankly, don't know much about Android, but found this, don't know if you've seen this code;
perhpas it could help:
http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/2.2_r1.1/com/android/email/activity/MessageList.java
Avatar of Sreejith22
Sreejith22
Flag of India image

ASKER

Would love to have code snippet which will do the stuff for me.  The link you gave contains approximately 2000 lines of code in which I could not find what I was looking for. I guess, the crux of my requirement can be met with less than 10 lines of code.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

you get that from the ServiceState
But that detail isn't available to you directly
Best you can do is have a listener that gets notified when state changes


public class ServiceStateListener extends PhoneStateListener{
   @Override
   public void onServiceStateChanged(ServiceState serviceState) {
       ...
   }
}


Avatar of Sreejith22
Sreejith22
Flag of India image

ASKER

By service provider, I mean, e-mail Service provider and not GSM service providers.

So, in this context PhoneStateListener has no relevance I presume.

Anyway, thanks for your help.
Avatar of Mick Barry
Mick Barry
Flag of Australia image

sorry misread the question
I think what your after is the content providers, in your case Email Providers
http://developer.android.com/guide/topics/providers/content-providers.html
ASKER CERTIFIED SOLUTION
Avatar of Sreejith22
Sreejith22
Flag of India image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Sreejith22
Sreejith22
Flag of India image

ASKER

no help worked
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo