DZone
Mobile Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Mobile Zone > Real email accounts inside the Windows Phone emulator

Real email accounts inside the Windows Phone emulator

Denzel D. user avatar by
Denzel D.
·
Jun. 14, 11 · Mobile Zone · Interview
Like (0)
Save
Tweet
13.18K Views

Join the DZone community and get the full member experience.

Join For Free

In the previous version of the Windows Phone SDK one of the main problems was the fact that the email capabilities were directly removed from the OS, so the EmailComposeTask was useless without a physical device. With Mango, the situation changed and although there is no easy (let's say - direct) way to link the OS to a Live account (you cannot download Marketplace content without one), there is the possibility to have GMail and Yahoo Mail as fully functional accounts in the emulator.

Let's start with a simple code snippet:

PhoneCallTask task = new PhoneCallTask();
task.PhoneNumber = "000000000";
task.DisplayName = "User K. User";
task.Show();

Ultimately, I couldn't care less about the number and the name I am passing here. All I need is be able to access the People Hub. Once the task is activated and my application is sent to the background, I am faced with a fake call:

Next step is to add a person to a call, so I am clicking on Add Call and that's all I needed. Now I am able to click on the People button and navigate to the People Hub (otherwise locked in the OS):

Now a swipe to the left, and I am able to see the What's New panorama slide. Here is where it gets interesting. Even if the user is prompted with a message to add a Twitter or Facebook account, there is no way those can be added with the locked version of the emulator.

Initially, there is the Google option (for GMail):

Any Google account will do here, and once you enter the correct credentials, you will be able to access the connected inbox from the emulator.

So the next question - where exactly is Yahoo, since I mentioned it? It is hidden a bit deeper than this, and it is invoked directly from a system application. To be specific - from the built-in email client. Since GMail is already configured, open the client and expand the application bar:

Click on Add Email Account, and there you will see that now Yahoo appeared in the list of available providers. The reason Yahoo only appears here is because it is not integrated with the People hub and is only available to manage email.

You can set it up the same way as you set up the Google account, as long as you have the proper credentials. Congratulations! Now you have real email accounts set up and synced in the emulator!

Now, whenever I am using the EmailComposeTask:

EmailComposeTask task = new EmailComposeTask();
task.To = "someemail@provider.com";
task.Subject = "Hello!";
task.Body = "Hello there!";
task.Show();

I will be prompted to select one of the existing accounts:

Windows Phone

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is High Cardinality?
  • What Developers Need to Know About Table Partition Pruning
  • Event-Driven Hello World Program
  • Artificial Intelligence (AI) And Its Assistance in Medical Diagnosis

Comments

Mobile Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo