1

I am trying to create an email client on android, I am new to android so, I tried different sample codes but I'm getting many warning two of which are given below and android emulator fails to lauch...Can email client application run on emulator?(I used following links:

http://www.jondev.net/articles/Sending_Emails_without_User_Intervention_%28no_Intents%29_in_Android

Sending Email in Android using JavaMail API without using the default/built-in app )

[2012-07-24 13:01:56 - test] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class

(javax.activation.DataHandler$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.

[2012-07-24 13:01:56 - test] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class

(javax.mail.Session$2) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.

Community
  • 1
  • 1
blackfyre
  • 2,549
  • 5
  • 39
  • 58

2 Answers2

0

Answer is "No", E-mail client will not works in emulator because the emulator doesn't include any email application

Yash
  • 1,751
  • 13
  • 14
  • I am working with android 4 and the emulator already has an application which can send email...that's why I tried code from above links.. – blackfyre Jul 24 '12 at 11:28
  • 1
    StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); I added above lines now its working in emulator. :) – blackfyre Jul 25 '12 at 07:59
0

Sync your mail account into your actual device and then try in actual device it will work.

Yash
  • 1,751
  • 13
  • 14
  • Now, it is working on emulator but not on device, can you please explain what is meant by synchronizing mail account into android phone? – blackfyre Jul 25 '12 at 08:02
  • 1
    go to your device settings menu in that you will find "account and sync" select that option then select "Add account Button" and enter your account details such as mail id and password after that tick mark the Auto Sync option. You done Job. now it will works – Yash Jul 25 '12 at 09:16