2

i looking for code to send an email from my android application. I have googled and read that the code that are given will not run on emulators. i will have to put the code on actual devices to send an email. why is this so?

thank you in advance

user590849
  • 11,655
  • 27
  • 84
  • 125
  • do you have a link to this code? – bigstones Feb 18 '11 at 14:31
  • We can send email successfully via emulator. please refer [http://stackoverflow.com/questions/6978877/how-can-i-configure-gmail-in-android-emulator][1] [1]: http://stackoverflow.com/questions/6978877/how-can-i-configure-gmail-in-android-emulator – Himanshu Jan 02 '12 at 09:25

4 Answers4

7

This migh be helpful Android Email Intent

If you are using an emulator, you’ll need to configure the email client. If the email client is not configured, it will not respond to the Intent we’ll be discussing. If you want to see the chooser in action, you’ll need to configure a device using multiple messaging applications, such as the Gmail application and the Email application.

But using a phone might be way better and easy for sure.

Necronet
  • 6,704
  • 9
  • 49
  • 89
  • 1
    Of course, an actual device would work easier. But some of us don't have one. Your post begs the question: How do I configure an email client to work with the emulator? – Mike S. Nov 30 '12 at 18:13
  • Yes could you please tell me how to configure the email client inside the emulator? – MetaldroiD Jan 30 '14 at 11:43
2

Because the emulator does not have an email app. You'll have to install one.

Robby Pond
  • 73,164
  • 16
  • 126
  • 119
2

As the previous answers said, the emulator doesn't include any email application for security purposes. Nonetheless you can download one (k9mail, for example) and it will work without issues whatsoever.

ferostar
  • 7,074
  • 7
  • 38
  • 61
0

Because emulator is our virtual device is use only for testing purpose. and reason is emulator is not a valid IP address due to security purpose it is not send email by emulator.

DynamicMind
  • 4,240
  • 1
  • 26
  • 43