On Fri, Oct 21, 2011 at 4:41 AM, Manikandan M <[email protected]> wrote: > Intent mailClient = new Intent(Intent.ACTION_VIEW); > mailClient.setClassName("com.google.android.gm", > "com.google.android.gm.ConversationListActivity"); > startActivity(mailClient); > > it is working for gmail accounts.
Until Google refactors the app, or makes that particular activity non-exported. Do not use this if you want a long-term reliable application. > 1. its is open only last viewed gmail account. > suppose i have 2 gmail accounts [email protected] and [email protected]. > if i was viewed [email protected] lastly then this intent will open > [email protected] inbox but i need to view the 1st one. How do i switch > between accounts. The user is perfectly capable of doing that using the Gmail UI. > 2. We are accessing the class name straight away through intent, so if any > updated from gmail app that may cause problem(if they change the activity > name or package) Correct. > 3. Its is only working for gmail how do i open yahoo or other email clients > inbox? There is no published API for Gmail or the Email AOSP application. To determine if any third party has such an API, use the following pseudocode: for each third-party email client find Web site for that email client search Web site for published API if found use it else contact developers of the email client to see if there is an API you missed if found use it end if end if end for -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] 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

