[android-developers] Re: How to access Phone Book
Use something like this.modify this code according to your requirement. * public* *void* onCreate(Bundle icicle) { *super*.onCreate(icicle); Cursor c = getContentResolver().query(People.*CONTENT_URI*, *null*, *null*, *null*, *null*); startManagingCursor(c); String[] columns = *new* String[]{People.*NAME*}; // Comment *int*[] names = *new* *int*[]{R.id.*row_entry*}; mAdapter = *new* SimpleCursorAdapter(*this*, R.layout.*main*, c, columns, names); *this*.setListAdapter(mAdapter); } @Override *protected* *void* onListItemClick(ListView l, View v, *int* position, *long * id){ *super*.onListItemClick(l, v, position, id); Intent i = *new* Intent(); Cursor c = (Cursor) mAdapter.getItem(position); *long* phoneID = c.getLong(c.getColumnIndex(People.*PRIMARY_PHONE_ID*)); i.setData(ContentUris.*withAppendedId*( android.provider.Contacts.Phones.*CONTENT_URI*, phoneID)); *this*.startActivity(i); On Wed, Mar 4, 2009 at 10:12 AM, cool.manish mannishga...@gmail.com wrote: Hi, I am creating an application which will display all contacts from the phone book. Is there any API which can access the phone book. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Interesting Question
Intent startActivity = new Intent(); startActivity.setAction(android.intent.action.MAIN); startActivity.addCategory(android.intent.category.HOME); startActivity(startActivity); On Wed, Feb 25, 2009 at 1:04 PM, ipeg.stud...@gmail.com wrote: Hello... Can any one tel me what is the method behind Home button? Am waiting for the correct answer. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use check box in list view?
Thanks a lot.I will try the aboce code. On Tue, Feb 17, 2009 at 10:24 PM, Kirk kirk.mora...@gmail.com wrote: Hi Dileep, The following code will loop through all items in the ListView 'lv' and, if the checkbox is checked, will extract the email at that position. It could take a bit longer if the list is long, but I don't know of any other way to extract checked values. ListView lv = some ListView Object; int listItemCount = lv.getChildCount(); for( int i=0;ilistItemCount;i++ ) { CheckBox cbox = (CheckBox) ((View)lv.getChildAt(i)).findViewById (R.id.checkbox); if( cbox.isChecked() ) { String email = ((TextView)((View)lv.getChildAt(i)).findViewById (R.id.email_field)).getText(); } } Kirk On Feb 17, 6:53 am, dilu discover.dile...@gmail.com wrote: Hi I have a list view with checkbox .List view contains all email list from phonebook application.Now i want to check multiple email at a time.After checking the email items ,I want to send some request to selected email. So,please tell me how to do this? any sample code or tutorial or anything relevant to this? Thanks dileep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get lists of email from contact application?
its not working.iF u have complete code then plz giv.i will check.what u suggested is not working.anyway thanks for giving your time. On Fri, Feb 6, 2009 at 8:08 AM, Mark Roberts snappe...@gmail.com wrote: Try extending the class with ListActivity instead of Activity. Then make sure you change the linearLayout to a ListView in layout file and give it an attribute of android:id=@+id/list On Feb 5, 12:42 am, dileep singh discover.dile...@gmail.com wrote: Hi Mark, As suggested by u ,i am using the same code.this is my code:- But its returning blank screen,eventhough in conatct application i have added the name,phone no. and email.. * import* android.app.Activity; * import* android.content.ContentUris; * import* android.database.Cursor; * import* android.net.Uri; * import* android.os.Bundle; * import* android.provider.Contacts.People; * import* android.util.Log; * import* android.widget.ListAdapter; * import* android.widget.SimpleCursorAdapter; * public* *class* GetEmail *extends* Activity { /** Called when the activity is first created. */ *private* ListAdapter mAdapter; *public* *static* *final* String[] *METHODS_PROJECTION* = *new* String[] { People.ContactMethods.*_ID*, People.ContactMethods.*KIND*, People.ContactMethods.*DATA*, People.ContactMethods.*TYPE*, People.ContactMethods.*LABEL*, People.ContactMethods.*ISPRIMARY*, }; Uri mUri; @Override *public* *void* onCreate(Bundle savedInstanceState) { *super*.onCreate(savedInstanceState); setContentView(R.layout.*main*); mUri = ContentUris.*withAppendedId*(Uri.*parse*(content://contacts/people),1); //1 is the ID of the first created contact Uri methodsUri = Uri.*withAppendedPath*(mUri,People.ContactMethods.* CONTENT_DIRECTORY*); Cursor methodsCursor = getContentResolver().query (methodsUri,*METHODS_PROJECTION*, kind=1, *null*, *null*); String[] columns = *new* String[]{People.*_ID*}; // Comment *int*[] names = *new* *int*[]{R.id.*row_entry*}; Log.*i*(Cursor, Count = + methodsCursor.getCount()); mAdapter = *new* SimpleCursorAdapter(*this*, R.layout.*main*, methodsCursor, columns, names); *this*.setListAdapter(mAdapter); } * private* *void* setListAdapter(ListAdapter adapter) { // *TODO* Auto-generated method stub } } main.xml:- ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android * android:orientation=*horizontal* android:layout_width=*fill_parent* android:layout_height=*wrap_content* TextView android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:text=*email: * / TextView android:id=*@+id/row_entry* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:text=*Name: * / /LinearLayout AndroidManifest: ?xml version=*1.0* encoding=*utf-8*? manifest xmlns:android=*http://schemas.android.com/apk/res/android; * package=*com.android.hello * android:versionCode=*1 * android:versionName=*1.0.0* uses-permission android:name=*android.permission.READ_CONTACTS*/ uses-permission android:name=*android.permission.CALL_PHONE*/ application android:icon=*@drawable/icon* android:label=* @string/app_name* activity android:name=*.GetEmail * android:label=*@string/app_name* intent-filter action android:name=*android.intent.action.MAIN* / category android:name=*android.intent.category.LAUNCHER* / /intent-filter /activity /application /manifest On Wed, Feb 4, 2009 at 10:09 PM, dileep singh discover.dile...@gmail.comwrote: Thank you very much Mark.I will try this code and will let you know.once again thanks. On Wed, Feb 4, 2009 at 9:12 PM, Mark Roberts snappe...@gmail.com wrote: import android.app.Activity; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.util.Log; public class Start extends Activity { /** Called when the activity is first created. */ public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; Uri mUri; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), 1); //1 is the ID of the first created contact Uri methodsUri = Uri.withAppendedPath(mUri
[android-developers] Re: How to get lists of email from contact application?
Hi Mark, Can u give me some sample code?I am not able to get email with the above code. please provide me somple code On Wed, Feb 4, 2009 at 12:53 AM, dileep singh discover.dile...@gmail.comwrote: Thanks a lot mark.I will try the above code. On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts snappe...@gmail.com wrote: If you are looking for the emails for a specific contact then you could do it like this where id is the id of the contact for which you are trying to get the data: public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), id) Uri methodsUri = Uri.withAppendedPath(mUri, People.ContactMethods.CONTENT_DIRECTORY); Cursor methodsCursor = getContentResolver().query(methodsUri, METHODS_PROJECTION, kind=1, null, null); On Feb 3, 12:05 pm, dilu discover.dile...@gmail.com wrote: Hi, Please tell me how to get lists of email from contact application in android?If possible then please provide me some sample code or tutorial on this. please help me. Thanks dileep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get lists of email from contact application?
Thank you very much Mark.I will try this code and will let you know.once again thanks. On Wed, Feb 4, 2009 at 9:12 PM, Mark Roberts snappe...@gmail.com wrote: import android.app.Activity; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.util.Log; public class Start extends Activity { /** Called when the activity is first created. */ public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; Uri mUri; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), 1); //1 is the ID of the first created contact Uri methodsUri = Uri.withAppendedPath(mUri, People.ContactMethods.CONTENT_DIRECTORY); Cursor methodsCursor = getContentResolver().query (methodsUri,METHODS_PROJECTION, kind=1, null, null); Log.i(Cursor, Count = + methodsCursor.getCount()); } } On Feb 4, 4:44 am, dileep singh discover.dile...@gmail.com wrote: Hi Mark, Can u give me some sample code?I am not able to get email with the above code. please provide me somple code On Wed, Feb 4, 2009 at 12:53 AM, dileep singh discover.dile...@gmail.comwrote: Thanks a lot mark.I will try the above code. On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts snappe...@gmail.com wrote: If you are looking for the emails for a specific contact then you could do it like this where id is the id of the contact for which you are trying to get the data: public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), id) Uri methodsUri = Uri.withAppendedPath(mUri, People.ContactMethods.CONTENT_DIRECTORY); Cursor methodsCursor = getContentResolver().query(methodsUri, METHODS_PROJECTION, kind=1, null, null); On Feb 3, 12:05 pm, dilu discover.dile...@gmail.com wrote: Hi, Please tell me how to get lists of email from contact application in android?If possible then please provide me some sample code or tutorial on this. please help me. Thanks dileep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to get lists of email from contact application?
Hi Mark, As suggested by u ,i am using the same code.this is my code:- But its returning blank screen,eventhough in conatct application i have added the name,phone no. and email.. * import* android.app.Activity; * import* android.content.ContentUris; * import* android.database.Cursor; * import* android.net.Uri; * import* android.os.Bundle; * import* android.provider.Contacts.People; * import* android.util.Log; * import* android.widget.ListAdapter; * import* android.widget.SimpleCursorAdapter; * public* *class* GetEmail *extends* Activity { /** Called when the activity is first created. */ *private* ListAdapter mAdapter; *public* *static* *final* String[] *METHODS_PROJECTION* = *new* String[] { People.ContactMethods.*_ID*, People.ContactMethods.*KIND*, People.ContactMethods.*DATA*, People.ContactMethods.*TYPE*, People.ContactMethods.*LABEL*, People.ContactMethods.*ISPRIMARY*, }; Uri mUri; @Override *public* *void* onCreate(Bundle savedInstanceState) { *super*.onCreate(savedInstanceState); setContentView(R.layout.*main*); mUri = ContentUris.*withAppendedId*(Uri.*parse*(content://contacts/people),1); //1 is the ID of the first created contact Uri methodsUri = Uri.*withAppendedPath*(mUri,People.ContactMethods.* CONTENT_DIRECTORY*); Cursor methodsCursor = getContentResolver().query (methodsUri,*METHODS_PROJECTION*, kind=1, *null*, *null*); String[] columns = *new* String[]{People.*_ID*}; // Comment *int*[] names = *new* *int*[]{R.id.*row_entry*}; Log.*i*(Cursor, Count = + methodsCursor.getCount()); mAdapter = *new* SimpleCursorAdapter(*this*, R.layout.*main*, methodsCursor, columns, names); *this*.setListAdapter(mAdapter); } * private* *void* setListAdapter(ListAdapter adapter) { // *TODO* Auto-generated method stub } } main.xml:- ?xml version=*1.0* encoding=*utf-8*? LinearLayout xmlns:android=*http://schemas.android.com/apk/res/android* android:orientation=*horizontal* android:layout_width=*fill_parent* android:layout_height=*wrap_content* TextView android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:text=*email: * / TextView android:id=*@+id/row_entry* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:text=*Name: * / /LinearLayout AndroidManifest: ?xml version=*1.0* encoding=*utf-8*? manifest xmlns:android=*http://schemas.android.com/apk/res/android; * package=*com.android.hello * android:versionCode=*1 * android:versionName=*1.0.0* uses-permission android:name=*android.permission.READ_CONTACTS*/ uses-permission android:name=*android.permission.CALL_PHONE*/ application android:icon=*@drawable/icon* android:label=* @string/app_name* activity android:name=*.GetEmail * android:label=*@string/app_name* intent-filter action android:name=*android.intent.action.MAIN* / category android:name=*android.intent.category.LAUNCHER* / /intent-filter /activity /application /manifest On Wed, Feb 4, 2009 at 10:09 PM, dileep singh discover.dile...@gmail.comwrote: Thank you very much Mark.I will try this code and will let you know.once again thanks. On Wed, Feb 4, 2009 at 9:12 PM, Mark Roberts snappe...@gmail.com wrote: import android.app.Activity; import android.content.ContentUris; import android.database.Cursor; import android.net.Uri; import android.os.Bundle; import android.provider.Contacts.People; import android.util.Log; public class Start extends Activity { /** Called when the activity is first created. */ public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; Uri mUri; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), 1); //1 is the ID of the first created contact Uri methodsUri = Uri.withAppendedPath(mUri, People.ContactMethods.CONTENT_DIRECTORY); Cursor methodsCursor = getContentResolver().query (methodsUri,METHODS_PROJECTION, kind=1, null, null); Log.i(Cursor, Count = + methodsCursor.getCount()); } } On Feb 4, 4:44 am, dileep singh discover.dile...@gmail.com wrote: Hi Mark, Can u give me some sample code?I am not able to get email with the above code. please provide me somple code On Wed, Feb 4, 2009 at 12:53 AM, dileep singh discover.dile...@gmail.comwrote: Thanks a lot mark.I will try the above code. On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts snappe...@gmail.com wrote: If you are looking for the emails for a specific contact then you could do it like this where id is the id of the contact for which you are trying to get the data: public static final String
[android-developers] Re: How to get lists of email from contact application?
Thanks a lot mark.I will try the above code. On Tue, Feb 3, 2009 at 10:46 PM, Mark Roberts snappe...@gmail.com wrote: If you are looking for the emails for a specific contact then you could do it like this where id is the id of the contact for which you are trying to get the data: public static final String[] METHODS_PROJECTION = new String[] { People.ContactMethods._ID, People.ContactMethods.KIND, People.ContactMethods.DATA, People.ContactMethods.TYPE, People.ContactMethods.LABEL, People.ContactMethods.ISPRIMARY, }; mUri = ContentUris.withAppendedId(Uri.parse(content://contacts/ people), id) Uri methodsUri = Uri.withAppendedPath(mUri, People.ContactMethods.CONTENT_DIRECTORY); Cursor methodsCursor = getContentResolver().query(methodsUri, METHODS_PROJECTION, kind=1, null, null); On Feb 3, 12:05 pm, dilu discover.dile...@gmail.com wrote: Hi, Please tell me how to get lists of email from contact application in android?If possible then please provide me some sample code or tutorial on this. please help me. Thanks dileep --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Web Service
Thanks a lot Mark.Sorry for late reply.I was out of station so i didnt reply u.I will check all suggestions suggested by u and let u know. Thanks. dileep. HAPPY XMAS NEW YEAR IN ADVANCE. On Sat, Dec 20, 2008 at 2:28 AM, Mark Murphy mmur...@commonsware.comwrote: Mark K wrote: Since Android supports regular Java object serialization, you can just stream objects to and from Java app servers such as Tomcat etc, Using ObjectOutput/Input streams. See Tomcat docs and examples of how do do this. This is a first for a mobile platform! Out of curiosity, have you tried this? I wasn't sure if the Dalvik VM might use a different serialization structure than would regular Java, causing cross-environment compatibility problems. If it works, though, great! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Web Service
Thanks Mark. Actually i want to call a web service which should return xml thing. Please reply. On Fri, Dec 19, 2008 at 6:33 PM, Mark Murphy mmur...@commonsware.comwrote: dilu wrote: Hi Plz tell me that what is the best way to work on web services in android.I dont want to use third party library.I want to use in-built library. I do not know what you mean by work on web services. For example, if you wish to build a Web service client, and the Web service uses a REST-style API, HttpURLConnection or the HTTPClient (org.apache.http.*) will work. Or, if you wish to build a Web service client, and the Web service uses XML-RPC, somebody else on this list posted a link to their XML-RPC implementation for Android. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.9 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to send email programmatically?
Hi Peli, Is sending email stuff is supporting in android emulator sdk1.0 r2?:Email application is dere but when i am executing that code , message is appearing that no application can perform this action.A lot of people are having this problem.So,please tell whats the reason ,eventhough email client is dere.Do we need to add something xtra in manifestfile or what? Thanks On Wed, Dec 17, 2008 at 4:56 PM, Peli peli0...@googlemail.com wrote: Currently, the OpenIntents table seems to be more complete :-) http://www.openintents.org/en/intentstable (although there are still more intents that can be found in the original documentation: e.g. http://code.google.com/android/reference/android/content/Intent.html ) Peli www.openintents.org On Dec 17, 2:49 am, Dianne Hackborn hack...@android.com wrote: There is a lot of stuff missing from that doc. On Tue, Dec 16, 2008 at 2:26 PM, filbert filbert...@gmail.com wrote: According to this page http://code.google.com/android/reference/available-intents.html the mailto: url is not supported by an intent... unless it was simply left off the list by accident. That is a possible explanation but my attempts to use mailto: in a URL result in errors.. unfortunately I cannot list the exact error here b/c I already switched to Peli's suggested method of emailing. Siva, for your no application error my guess is that the android emulator does not have an e-mail application since it doesn't actually know who you are (you'll notice there is no email or gmail app in the emulator's app list). I don't know if a developer phone would work either. You may want to consider testing on a real phone and seeing if it works... that is what I plan to do once i get my app to a stable state. On Dec 13, 10:31 pm, Siva G sivarama...@gmail.com wrote: Hi, When I try this snippet I get a message saying No Applications can perform this action. Is there something else I should take care of like in the manifest file? Thanks, Siva G On Dec 12, 5:32 am, Peli peli0...@googlemail.com wrote: Ok, the site is accessible now, but for future reference I copy the code from there:http://www.openintents.org/en/node/121 Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, emailtext); sendIntent.putExtra(Intent.EXTRA_SUBJECT, Subject); sendIntent.setType(message/rfc822); startActivity(Intent.createChooser(sendIntent, Title:)); Peliwww.openintents.orgwww.openintents.bizhttp://peliwww.openintents.orgwww.openintents.biz/ On Dec 6, 7:36 pm, Sunit Katkar sunitkat...@gmail.com wrote: www.openintents.orgseemstobedown. I got to this thread after a long time and now that site is down :-( - Sunit Katkarhttp:// sunitkatkar.blogspot.com/-AndroidOSTutorials On Mon, Dec 1, 2008 at 6:06 PM, Xavier Mathews xavieruni...@gmail.comwrote: Would They Be Using Gmail? If So You Could Have It Programed With IMAP! On 12/01/2008, Jay-andro jayan...@gmail.com wrote: I too want tosendemailprogrammtaically (i.e without asendform). I've got it working with my hardcoded credentials, but I want my app to use the user's account tosendtheemailfrom the user's account and receive replies to his account. How do I do this? On Nov 12, 10:51 am, Sunit Katkar sunitkat...@gmail.com wrote: Thank you. I will try this. On Wed, Nov 12, 2008 at 12:44 AM, Peli peli0...@googlemail.com wrote: You can find a code snippet here: http://www.openintents.org/en/node/121 There is also a related SENDTO action which you can look up in the documentation. Peli www.openintents.org On Nov 12, 8:52 am, Sunit Katkar sunitkat...@gmail.com wrote: Ok how would I implement the 'sendform'. Do you mean that I should launch a web browser and use some webmail type of application hosted on a server? I was thinking about theEmailOutbox. How can I put a simple text message as anemailin the Outbox? I know I could do this long long ago with Palm OS ver3.0. Hope there is a way to do it on Android. - Sunit On Tue, Nov 11, 2008 at 5:25 PM, Andrew Burgess abom...@gmail.com wrote: If you don't want to direct the user to the typicalsendform, then you're going to have to either try and adapt an existing java based mailer to android or write an SMTP client from scratch. The SMTP standard isn't too hard to implement. On Tue, Nov 11, 2008 at 8:05 PM, Sunit Katkar sunitkat...@gmail.com wrote: Any
[android-developers] Re: How to send email programmatically?
Thanks peli.I will check that . On Wed, Dec 17, 2008 at 6:32 PM, Peli peli0...@googlemail.com wrote: Currently there is no application installed on the emulator by default that can handle this intent. On the 'real' device G1 there are Google Mail and MMS available to handle this intent. Looking at the K9mail Manifest http://code.google.com/p/k9mail/source/browse/k9mail/trunk/AndroidManifest.xml it seems they support the SEND intent only for image/* MIME types, but they also support the SENDTO and VIEW intents with a mailto:; address. One could write to the K9mail group and suggest to support the SEND intent for other MIME types as well. I've written to the K9-mail team here: http://groups.google.com/group/k-9-mail/browse_frm/thread/2621f0a54b0bf03e Please add your comments and wishes there as well! Peli www.openintents.org On Dec 17, 12:41 pm, dileep singh discover.dile...@gmail.com wrote: Hi Peli, Is sending email stuff is supporting in android emulator sdk1.0 r2?:Email application is dere but when i am executing that code , message is appearing that no application can perform this action.A lot of people are having this problem.So,please tell whats the reason ,eventhough email client is dere.Do we need to add something xtra in manifestfile or what? Thanks On Wed, Dec 17, 2008 at 4:56 PM, Peli peli0...@googlemail.com wrote: Currently, the OpenIntents table seems to be more complete :-) http://www.openintents.org/en/intentstable (although there are still more intents that can be found in the original documentation: e.g. http://code.google.com/android/reference/android/content/Intent.html ) Peli www.openintents.org On Dec 17, 2:49 am, Dianne Hackborn hack...@android.com wrote: There is a lot of stuff missing from that doc. On Tue, Dec 16, 2008 at 2:26 PM, filbert filbert...@gmail.com wrote: According to this page http://code.google.com/android/reference/available-intents.html the mailto: url is not supported by an intent... unless it was simply left off the list by accident. That is a possible explanation but my attempts to use mailto: in a URL result in errors.. unfortunately I cannot list the exact error here b/c I already switched to Peli's suggested method of emailing. Siva, for your no application error my guess is that the android emulator does not have an e-mail application since it doesn't actually know who you are (you'll notice there is no email or gmail app in the emulator's app list). I don't know if a developer phone would work either. You may want to consider testing on a real phone and seeing if it works... that is what I plan to do once i get my app to a stable state. On Dec 13, 10:31 pm, Siva G sivarama...@gmail.com wrote: Hi, When I try this snippet I get a message saying No Applications can perform this action. Is there something else I should take care of like in the manifest file? Thanks, Siva G On Dec 12, 5:32 am, Peli peli0...@googlemail.com wrote: Ok, the site is accessible now, but for future reference I copy the code from there:http://www.openintents.org/en/node/121 Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, emailtext); sendIntent.putExtra(Intent.EXTRA_SUBJECT, Subject); sendIntent.setType(message/rfc822); startActivity(Intent.createChooser(sendIntent, Title:)); Peliwww.openintents.orgwww.openintents.bizhttp://peliwww.openintents.orgwww.openintents.biz/ http://peliwww.openintents.orgwww.openintents.biz/ On Dec 6, 7:36 pm, Sunit Katkar sunitkat...@gmail.com wrote: www.openintents.orgseemstobedown. I got to this thread after a long time and now that site is down :-( - Sunit Katkarhttp:// sunitkatkar.blogspot.com/-AndroidOSTutorials On Mon, Dec 1, 2008 at 6:06 PM, Xavier Mathews xavieruni...@gmail.comwrote: Would They Be Using Gmail? If So You Could Have It Programed With IMAP! On 12/01/2008, Jay-andro jayan...@gmail.com wrote: I too want tosendemailprogrammtaically (i.e without asendform). I've got it working with my hardcoded credentials, but I want my app to use the user's account tosendtheemailfrom the user's account and receive replies to his account. How do I do this? On Nov 12, 10:51 am, Sunit Katkar sunitkat...@gmail.com wrote: Thank you. I will try this. On Wed, Nov 12, 2008 at 12:44 AM, Peli peli0...@googlemail.com wrote: You can find a code snippet here: http://www.openintents.org/en/node/121 There is also a related SENDTO action which you can look up in the documentation
[android-developers] Re: How to send email programmatically?
Ok.No prob.But whenever u get time please check this issue,coz a lot of guys are having this prob.But anyway u hav done a great job.Thanks a lot.I also appreciate that u have started echarcha.com.Today only i saw that. Thanks Dileep On Thu, Dec 18, 2008 at 12:22 PM, Sunit Katkar sunitkat...@gmail.comwrote: Sorry Dileep, I have not tried with the emulator and I really dont know what the issue could be. I will dabble with it and let you know, but dont wait for my answer as I will be busy for a couple of days and over the weekend. - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials On Wed, Dec 17, 2008 at 9:56 PM, dileep singh discover.dile...@gmail.com wrote: Thanks a lot Sunit.U have done a good job.But in my emulator(ver1.0,r2) email client is dere.But then also when I am trying to send email message is appearing no application can perform this action. Please tell whats the prob.?I am wondering that email client is dere,but still why this message is appearing eventhough from emulator I can send email . On Thu, Dec 18, 2008 at 4:43 AM, Sunit Katkar sunitkat...@gmail.comwrote: The example code will open an Email client. In my case, it opens the Gmail application to send email. I will fix the code snippet. - Sunit Katkar http://sunitkatkar.blogspot.com/ - Android OS Tutorials On Wed, Dec 17, 2008 at 12:48 PM, filbert filbert...@gmail.com wrote: Sunit, thanks for your writeups, they've been helpful. Your Code Snippet 1 for this new tutorial has some formatting issues, the last few lines are not in the code box. Also, does your code open the email client to send or does it send automatically? your code looks similar to what's posted here and I thought it opened the email client (haven't tried it yet as I'm still on the emulator). On Dec 17, 1:39 pm, Sunit Katkar sunitkat...@gmail.com wrote: Okay I got this to work finally. Here is the code. http://sunitkatkar.blogspot.com/2008/12/sendmail-send-email-programma. .. - Sunit Katkarhttp://sunitkatkar.blogspot.com/- Android OS Tutorials On Wed, Dec 17, 2008 at 6:51 AM, friedger fried...@googlemail.com wrote: Are you working on a device or the emulator? On the emulator there is no email apps installed by default. Install Email or K9 and the code should work. Friedger openintents.org openintents.biz On 14 Dez., 05:31, Siva G sivarama...@gmail.com wrote: Hi, When I try this snippet I get a message saying No Applications can perform this action. Is there something else I should take care of like in the manifest file? Thanks, Siva G On Dec 12, 5:32 am, Peli peli0...@googlemail.com wrote: Ok, the site is accessible now, but for future reference I copy the code from there:http://www.openintents.org/en/node/121 Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, email text); sendIntent.putExtra(Intent.EXTRA_SUBJECT, Subject); sendIntent.setType(message/rfc822); startActivity(Intent.createChooser(sendIntent, Title:)); Peliwww.openintents.orgwww.openintents.bizhttp://peliwww.openintents.orgwww.openintents.biz/ On Dec 6, 7:36 pm, Sunit Katkar sunitkat...@gmail.com wrote: www.openintents.orgseemstobedown. I got to this thread after a long time and now that site is down :-( - Sunit Katkarhttp:// sunitkatkar.blogspot.com/-AndroidOSTutorials On Mon, Dec 1, 2008 at 6:06 PM, Xavier Mathews xavieruni...@gmail.comwrote: Would They Be Using Gmail? If So You Could Have It Programed With IMAP! On 12/01/2008, Jay-andro jayan...@gmail.com wrote: I too want to send email programmtaically (i.e without a send form). I've got it working with my hardcoded credentials, but I want my app to use the user's account to send the email from the user's account and receive replies to his account. How do I do this? On Nov 12, 10:51 am, Sunit Katkar sunitkat...@gmail.com wrote: Thank you. I will try this. On Wed, Nov 12, 2008 at 12:44 AM, Peli peli0...@googlemail.com wrote: You can find a code snippet here: http://www.openintents.org/en/node/121 There is also a related SENDTO action which you can look up in the documentation. Peli www.openintents.org On Nov 12, 8:52 am, Sunit Katkar sunitkat...@gmail.com wrote: Ok how would I implement the 'send form'. Do you mean that I should launch a web browser and use some webmail type of application hosted on a server? I was thinking about the Email Outbox. How can I put a simple text message as an email in the Outbox? I know I could do this long long ago with Palm OS ver3.0. Hope there is a way to do
[android-developers] Re: How to use built in email application to send email from my application?
hey please check this link.http://androidguys.com/?p=3100#comment-5168 once again mark has proved himself that he is always dere to help android guys. Thanks mark On Sat, Dec 13, 2008 at 1:38 AM, Peli peli0...@googlemail.com wrote: I'd love to see that one extra line in your example that shows how to add an image file attachment with the image file stored on the SD card. :-) Oh, sorry, you said image. sendIntent.setType(image/png); sendIntent.putExtra(Intent.EXTRA_STREAM, file:///sdcard/ mygirlfriend.png); I'm sure the next question is how to have both, subject and attachment, but I'll leave this as an exercise to the reader :-) Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use built in email application to send email from my application?
But i think there are very few link available on sending email .I think a lot of guys r facing this problem.But we are not able to find the correct solution for this.I f anyone know then please post it here Thanks. On Fri, Dec 12, 2008 at 4:21 PM, blindfold seeingwithso...@gmail.comwrote: Same with me. Basically all I want is to automatically compose an e- mail with a subject line, recipient address and an image attachment, and an e-mail app should then pop up with this automatically composed message, to let the user decide whether to send, edit or discard the message. My purpose is to let the user e-mail a camera snapshot for remote OCR analysis. The OCR back-end is already fully functional, linking to the WeOCR servers in Japan, and is platform-neutral on the user side, that is, works with any platform (Windows, Symbian, ...), but it is rather inconvenient for the user to manually compose the e- mail and figure out which snapshot from what folder to attach. Thanks On Dec 12, 11:33 am, dileep singh discover.dile...@gmail.com wrote: Thanks peli Do u have some sample code?tht will of great help for me. I am complete fresher. Waiting for ur reply Thanks DILU On Fri, Dec 12, 2008 at 3:56 PM, Peli peli0...@googlemail.com wrote: http://www.openintents.org/en/node/121 Peli www.openintents.org On Dec 12, 7:43 am, dilu discover.dile...@gmail.com wrote: Hi I wanna to send email from my application .I want to use built in email application to send mail from my application.So, can any one provide me some sample code or link for sending email using built in email application?Any advice on this topic is most welcome. Please reply.I am waiting for u people to reply. Thanks dilu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use built in email application to send email from my application?
Thanks peli Do u have some sample code?tht will of great help for me. I am complete fresher. Waiting for ur reply Thanks DILU On Fri, Dec 12, 2008 at 3:56 PM, Peli peli0...@googlemail.com wrote: http://www.openintents.org/en/node/121 Peli www.openintents.org On Dec 12, 7:43 am, dilu discover.dile...@gmail.com wrote: Hi I wanna to send email from my application .I want to use built in email application to send mail from my application.So, can any one provide me some sample code or link for sending email using built in email application?Any advice on this topic is most welcome. Please reply.I am waiting for u people to reply. Thanks dilu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: sending email
Thanks Bill Napier On Fri, Dec 5, 2008 at 3:53 AM, Bill Napier [EMAIL PROTECTED] wrote: Searching this forum for the term send email gave me this mail: http://groups.google.com/group/android-developers/browse_thread/thread/88bb36c676e3217b/c1d0be41174b4999?lnk=gstq=sending+email#c1d0be41174b4999 Which has some example code that you could use. On Thu, Dec 4, 2008 at 10:51 AM, dilu [EMAIL PROTECTED] wrote: Hi i want to develop an aplication which can send email .so can any one provide me sample code or any link that is useful.I got one site davanum srinivas blog,but tht code is too old and full code is not available right now,they have removed it from site.So provide me some link. Thankss dilu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: PLEASE TROUBLESHHOT MY ERROR
HI ludwig, i am already having loginscreen.xml file in my layout file.but still i am getting same error.xml file is: ?xml version=*1.0* encoding=*utf-8* ? RelativeLayout xmlns:android=*http://schemas.android.com/apk/res/android* android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:padding=*5dp* ImageView android:id=*@+id/imgAtrexis* android:src=*@drawable/atrexis* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:layout_alignParentTop=*true* android:layout_centerHorizontal=*true* android:padding=*10dp* / TextView android:id=*@+id/lblUsername* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:layout_below=*@id/imgAtrexis* android:text=*Username:* / EditText android:id=*@+id/txtUsername* android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:singleLine=*true* android:layout_below=*@id/lblUsername* android:layout_marginBottom=*5dp* / TextView android:id=*@+id/lblPassword* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:layout_below=*@id/txtUsername * android:text=*Password:* / EditText android:id=*@+id/txtPassword* android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:layout_below=*@id/lblPassword* android:password=*true* android:singleLine=*true* android:layout_marginBottom=*10dp* / CheckBox android:id=*@+id/cbRem* android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_centerHorizontal=*true* android:layout_below=*@id/txtPassword* android:text=*Remember Me* / Button android:id=*@+id/btnSign* android:layout_width=*80dp* android:layout_height=*wrap_content* android:layout_below=*@id/cbRem* android:padding=*10dp* android:layout_centerInParent=*true* android:text=*Sign In* / View android:id=*@+id/spacer1* android:layout_width=*fill_parent * android:layout_height=*10dp * android:layout_below=*@id/btnSign* / Button android:id=*@+id/btnQuit * android:layout_width=*80dp* android:layout_height=*wrap_content* android:layout_toLeftOf=*@id/btnSign* android:layout_alignBottom=*@id/spacer1* android:padding=*10dp* android:text=*Quit* / Button android:id=*@+id/btnClear * android:layout_width=*80dp* android:layout_height=*wrap_content* android:layout_toRightOf=*@id/btnSign* android:layout_alignTop=*@id/spacer1* android:padding=*10dp* android:text=*Clear* / TextView android:id=*@+id/lblMessage* android:layout_width=*fill_parent* android:layout_height=*wrap_content* android:layout_below=*@id/btnSign* android:text=*Enter username and password* / TextView android:id=*@+id/lblPowered* android:layout_width=*wrap_content* android:layout_height=*wrap_content* android:layout_alignParentBottom=*true* android:layout_alignParentRight=*true * android:textStyle=*bold* android:textColor=*#FF* android:text=*Powered By Atrexis* / /RelativeLayout On Thu, Oct 23, 2008 at 7:20 PM, Ludwig [EMAIL PROTECTED] wrote: You will need a file loginscreeen.xml in your res/layout directory that defines the layout. Your Java code looks ok. Ludwig 2008/10/23 dilu [EMAIL PROTECTED] hi I am getting error in my java file as R.layout.loginscreen cannot be resolved. my loginscreen. java file is as : package com.android.hello; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class LoginScreen extends Activity { private static final String TAG = LoginScreen; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.loginscreen); Log.i(TAG, onCreate() called!); } } please help me out . thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Error coming while creating a login page
HI PELI, THIS IS MINE login_screen.xml file ?xml version=*1.0* encoding=*utf-8*? RelativeLayout xmlns:android=*http://schemas.android.com/apk/res/android; * android:layout_width=*fill_parent* android:layout_height=*wrap_content * android:padding=*5dp* ImageView android:id=*@+id/imgAtrexis * android:src=*@drawable/atrexis* android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_alignParentTop=*true * android:layout_centerHorizontal=*true* android:padding=*10dp* / TextView android:id=*@+id/lblUsername * android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_below=*@id/imgAtrexis* android:text=*Username:* / EditText android:id=*@+id/txtUsername * android:layout_width=*fill_parent * android:layout_height=*wrap_content* android:singleLine=*true * android:layout_below=*@id/lblUsername * android:layout_marginBottom=*5dp* / TextView android:id=*@+id/lblPassword * android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_below=*@id/txtUsername* android:text=*Password:* / EditText android:id=*@+id/txtPassword * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:layout_below=*@id/lblPassword* android:password=*true * android:singleLine=*true* android:layout_marginBottom=*10dp* / CheckBox android:id=*@+id/cbRem * android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_centerHorizontal=*true * android:layout_below=*@id/txtPassword* android:text=*Remember Me* / Button android:id=*@+id/btnSign* android:layout_width=*80dp * android:layout_height=*wrap_content* android:layout_below=*@id/cbRem * android:padding=*10dp* android:layout_centerInParent=*true * android:text=*Sign In* / View android:id=*@+id/spacer1* android:layout_width=*fill_parent * android:layout_height=*10dp* android:layout_below=*@id/btnSign* / Button android:id=*@+id/Quit* android:layout_width=*80dp * android:layout_height=*wrap_content * android:layout_toLeft=*@id/btnSign * android:layout_alignBottom=*@id/spacer1* android:padding=*10dp * android:text=*Quit* / Button android:id=*@+id/Clear* android:layout_width=*80dp * android:layout_height=*wrap_content * android:layout_toRight=*@+id/btnSign * android:layout_alignTop=*@id/spacer1* android:padding=*10dp * android:text=*Clear* / TextView android:id=*@+id/lblMessage * android:layout_width=*fill_parent * android:layout_height=*wrap_content * android:layout_below=*@+id/btnSign * android:text=*Enter username and password* / TextView android:id=*@+id/lblPowered * android:layout_width=*wrap_content * android:layout_height=*wrap_content * android:layout_alignParentBottom=*true * android:layout_alignParentRight=*true* android:textStyle=*bold * android:textColor=*#FF* android:text=*Powered By Atrexis */ /RelativeLayout On Tue, Oct 21, 2008 at 6:50 PM, shailesh prakash [EMAIL PROTECTED]wrote: Hi dilu, As I can say with above details, you are using SDK 1.0 and the code you are writing is of style m5. If so see documentation and changes for 1.0 Regards Shailesh On Tue, Oct 21, 2008 at 6:30 PM, dilu [EMAIL PROTECTED] wrote: Hi' I am trying to create a login page with user name and password. In source file i have created two java file one is homescreen.java file and another one is loginscreen.java file. In homescreen.java file error is coming like this The method onActivityResult(int, int, Intent) in the type Activity is not applicable for the arguments (int, int, String, Bundle). part of the code is :- protected void onActivityResult(int requestCode, int resultCode, String data, Bundle extras) { super.onActivityResult(requestCode, resultCode, data, extras); if (requestCode == ACTIVITY_LOGIN) { // If the request was cancelled, then we are cancelled as well. if (resultCode == RESULT_CANCELED) { finish(); and in the login_screen.xml file I am getting error like this No resource identifier found for attribute 'layout_toRight' in package 'android' No resource identifier found for attribute 'layout_toLeft' in package 'android. please help me out. thanks. dilu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---