LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 02-21-2011, 11:17 PM   #1
jkm
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
Question email app is not working in android emulator


hi
i need to implement an email application for android.
i have a code of email app that is running fine, but only when i create a java project. It is not running when i create android project.
Is there any dependency to run this email app in android emulator?
Please help, i m stuck on this point. OR if any other solution, plz tell.
I m using eclipse in ubuntu.
This is my very first post in a forum, so sorry for any mistake.

Thanks in advance.
 
Old 02-22-2011, 10:40 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,093

Rep: Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301Reputation: 2301
Welcome to LQ.

What goes wrong? What are you using? Have you set about it with adb? Tried to collect a log? The android comes with gmail & email app, which use network & stuff. I think you have reading to do.
 
Old 02-23-2011, 03:24 AM   #3
jkm
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Exclamation email app is not working in android emulator

Thanks for reply.

I am using eclipse IDE in ubuntu. In eclipse, there are options to create a new project; like File>New>"Java project", "Android project", "Project...", etc. One thing is that I have an email application code.
Now, the problem is:
when i create a new "Java project" and use this email application code, it runs fine, mail sent successfully.
But, when i create a new "Android project" and use this email application code, it doesn't run; infact there is a run time error.
The log is as below:


Console log:

[2011-02-23 14:25:09 - AndroidEmailApp] ------------------------------
[2011-02-23 14:25:09 - AndroidEmailApp] Android Launch!
[2011-02-23 14:25:09 - AndroidEmailApp] adb is running normally.
[2011-02-23 14:25:09 - AndroidEmailApp] Performing email.app.sendmail activity launch
[2011-02-23 14:25:09 - AndroidEmailApp] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD9'
[2011-02-23 14:25:09 - AndroidEmailApp] WARNING: Application does not specify an API level requirement!
[2011-02-23 14:25:09 - AndroidEmailApp] Device API version is 9 (Android 2.3.1)
[2011-02-23 14:25:09 - AndroidEmailApp] Uploading AndroidEmailApp.apk onto device 'emulator-5554'
[2011-02-23 14:25:10 - AndroidEmailApp] Installing AndroidEmailApp.apk...
[2011-02-23 14:25:39 - AndroidEmailApp] Success!
[2011-02-23 14:25:40 - AndroidEmailApp] Starting activity email.app.sendmail on device emulator-5554


LogCat log:

02-23 14:26:39.124: INFO/System.out(2875): Hi...in try...1!
02-23 14:26:39.124: INFO/System.out(2875): Hi...in postmail...1!
02-23 14:26:39.135: INFO/System.out(2875): Hi...in postmail...2!
02-23 14:26:39.194: INFO/System.out(2875): Hi...in postmail...3!
02-23 14:26:39.385: INFO/System.out(2875): Hi...in postmail...4!
02-23 14:26:39.385: INFO/System.out(2875): Hi...in postmail...5!
02-23 14:26:39.475: INFO/System.out(2875): Hi...in postmail...6!
02-23 14:26:40.335: INFO/System.out(2875): Hi...in authentication...1!
02-23 14:26:40.335: INFO/System.out(2875): Hi...in authentication...2!
02-23 14:26:40.365: WARN/System.err(2875): Cannot send Email. javax.mail.MessagingException: Could not connect to SMTP host: gmail-smtp.l.google.com, port: 587;
02-23 14:26:40.365: WARN/System.err(2875): nested exception is:
02-23 14:26:40.375: WARN/System.err(2875): java.net.SocketException: Permission denied
02-23 14:26:40.385: INFO/System.out(2875): Hi...in try...2!

So, i want to know, is there any dependency to run this email application code in android emulator??, as it is running fine in "Java project".

--
Thanks
 
Old 02-28-2011, 07:18 PM   #4
jkm
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Smile

Hey!
that issue is now solved.
i had to take permission of internet in code.
now, mail is being sent through android emulator also.

thanks.
 
Old 03-02-2011, 10:56 AM   #5
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Mark it so. --J.L.Picard
 
Old 03-07-2011, 01:37 AM   #6
jkm
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Question How to add a progress bar in android email app?

Hi
Can anybody please tell me how to add a progress bar in android email application,
so that, when user clicks on "send mail" button, he/she can understand that the mail sending process is going on.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not start Android emulator in Slackware 13.1 kemsiro Slackware 9 02-10-2011 04:28 AM
LXer: Android App Build Environment With Eclipse, Android SDK, PhoneGap (Fedora 14) LXer Syndicated Linux News 2 02-01-2011 11:11 AM
LXer: Setting Up An Android App Build Environment With Eclipse, Android SDK, PhoneGap (Ubuntu 10.10) LXer Syndicated Linux News 0 01-27-2011 11:30 AM
Android Development in Linux.How To install Android Emulator?? jeevanism Linux - Mobile 3 12-28-2010 09:24 AM
Having trouble running Android emulator on Arch Linux mohtasham1983 Linux - Mobile 0 03-13-2009 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration