Send Email Using Onscreen Input Methods??

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Send Email Using Onscreen Input Methods??

Postby androidbase » Sat Feb 06, 2010 11:09 am

hi all,

i am new to work with email...

how to send an email using Onscreen Input Methods..

give me some sample codes...

thanks..
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Top

can i call this email layout? how?

Postby androidbase » Sat Feb 06, 2010 12:37 pm

hey,

can i call email layout like the image below? how?
Attachments
compose email.png
compose email.png (11.66 KiB) Viewed 235 times
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

is there any default classes to do this?

Postby androidbase » Sat Feb 06, 2010 12:41 pm

is there any default classes to do this?
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Postby icobasco » Sat Feb 06, 2010 3:27 pm

Hi,
what you really wanna do?
Sending the itent, you are allowed to pass the email app the data you need (address, subject....) so you don't need to set up your personal activity to do that.

Is it what you really wanted to know? :)
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

how to do that?

Postby androidbase » Sat Feb 06, 2010 4:02 pm

hi,

thanks for reply.

how to do that?

example please.. :cry: :cry: :cry:
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Postby icobasco » Sat Feb 06, 2010 4:03 pm

Jhon wrote:Intent sendIntent = new Intent(Intent.ACTION_SEND);
// Add attributes to the intent
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
sendIntent.putExtra(Intent.EXTRA_SUBJECT,"subject line");
sendIntent.putExtra(Intent.EXTRA_TEXT,"Body of email");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File("Filename")));
sendIntent.setType("vnd.android.cursor.dir/email");

startActivity(Intent.createChooser(sendIntent,"Email:"));


Quoting from another thread which should be moved to Tutorial section.
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Top

thanks.

Postby androidbase » Sat Feb 06, 2010 4:09 pm

hey ,

i asked that Layout of the To,Subject,Body of content edittext,etc. are wanna create by our own or not?

thanks in advance.
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Re: thanks.

Postby icobasco » Sat Feb 06, 2010 4:11 pm

androidbase wrote:hey ,

i asked that Layout of the To,Subject,Body of content edittext,etc. are wanna create by our own or not?

thanks in advance.


what!?
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

hi

Postby androidbase » Sat Feb 06, 2010 4:13 pm

the layout of above image
is i want to create that by our own or not???
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Postby icobasco » Sat Feb 06, 2010 4:15 pm

With itents you send your request to the Android built in app for emails.
So why wanna draw another app's activity? You tell it to you wanna send the email. Everything else is in charge of it.
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Postby icobasco » Sat Feb 06, 2010 4:21 pm

User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

but?

Postby androidbase » Sat Feb 06, 2010 4:22 pm

but this code shows "NO APPLICATION CAN PERFORM THIS ACTION" exception man..
androidbase
Experienced Developer
Experienced Developer
 
Posts: 50
Joined: Sat Jan 16, 2010 1:41 pm

Re: but?

Postby icobasco » Sat Feb 06, 2010 4:26 pm

Here you are the first Code Snippets for your case by plusminus (more than 2 years ago :O)
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Re: but?

Postby Rahul » Mon Feb 08, 2010 7:21 am

The code is right... Probably you are trying it on an Emulator which does not have any Email sending software installed in it(by default email sending softwares are not included in emulator). Try it on a real device.

androidbase wrote:but this code shows "NO APPLICATION CAN PERFORM THIS ACTION" exception man..
Rahul
Experienced Developer
Experienced Developer
 
Posts: 89
Joined: Wed Oct 01, 2008 11:16 am

Re: but?

Postby icobasco » Mon Feb 08, 2010 8:45 am

Rahul wrote:The code is right... Probably you are trying it on an Emulator which does not have any Email sending software installed in it


Right Rahul, I haven't tought about that...I'm used to test on Milestone, Liquid and Magic and very few times on the emulator. Thankx.
User avatar
icobasco
Senior Developer
Senior Developer
 
Posts: 108
Joined: Thu Jun 04, 2009 11:12 am
Location: Italy

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 5 guests