How can I start an Intent to launch the IM applicaiotn

by Nathan Summer » Tue, 09 Jun 2009 13:52:41 GMT


Sponsored Links
 Thanks. Can you also tell me how can I specify recipient of my message
when I start the intent?



2009/6/8 Jack Ha <jack...@t-mobile.com>:


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How can I launch the default Contact Application provided in SDK with my app

I was able to launch contacts by adding the following in my activity
class

startActivityForResult((new
Intent(Contacts.Intents.UI.LIST_ALL_CONTACTS_ACTION)),PICK_CONTACT_REQUEST);

Although I didnot get any data in the result / nor could I select a
contacts from the list.

So I have gone ahead and created a list similar to the list displayed
by Contacts by reading the oinfo from the content://contacts/people
database.
--~--~---------~--~----~------------~-------~--~----~

2. Using an autocomplete filled with information from a database query

I finally found how to do it!!!

Jope this is useful for someone:

In the main class:
 mAcReason = ((AutoCompleteTextView)
findViewById(R.id.ac_registerevent_reason));
ContactListAdapter adapter = new ContactListAdapter(this, mCursor);
this.mAcReason.setAdapter(adapter);

public static class ContactListAdapter extends CursorAdapter
implements Filterable {

                public ContactListAdapter(Context context, Cursor c) {
                    super(context, c);
                    Log.d("exp", "******************* A VER EHJEE
*****************");
                    mDb = new Database(context);
                    mDb.open();
                    Log.d("exp", "******************* A VER PUES 100
*****************");
                }

                @Override
                public View newView(Context context, Cursor cursor,
ViewGroup
parent) {
                        final LayoutInflater inflater =
LayoutInflater.from(context);
            final TextView view = (TextView) inflater.inflate(
            android.R.layout.simple_dropdown_item_1line, parent,
false);
            Log.d("exp", "******************* A VER 100
*****************");
            view.setText(cursor.getString(2));
            Log.d("exp", "******************* A VER PUES 150
*****************");
            return view;
                }

                @Override
                public void bindView(View view, Context context,
Cursor cursor) {
                        Log.d("exp", "******************* A VER 200
*****************");
                        ((TextView)
view).setText(cursor.getString(2));
                }

                @Override
                public String convertToString(Cursor cursor) {
                        Log.d("exp", "******************* A VER 300
*****************");
                        return cursor.getString(2);
                }

                 @Override
                public Cursor runQueryOnBackgroundThread(CharSequence
constraint) {
                    if (getFilterQueryProvider() != null) {
                        Log.d("exp"+constraint, "******************* A
VER PUES
800 *****************");
                        return
getFilterQueryProvider().runQuery(constraint);
                    }

                    StringBuilder buffer = null;
                    String[] args = null;
                    /*if (constraint != null) {
                        buffer = new StringBuilder();
                        buffer.append("UPPER(");
                        Log.d("exp", "******************* A VER 400
*****************");
                        buffer.append(Database.KEY_REASON);
                        Log.d("exp", "******************* A VER PUES
900
*****************");
                        buffer.append(") GLOB ?");
                        args = new String[]
{ constraint.toString().toUpperCase() + "*" };
                        //args = "g";
                        Log.d("exp"+constraint, "******************* A
VER
PUES 800 *****************");
                    }*/
                    Log.d("exp", "******************* A VER 500
*****************");
                    String where = "";
                    if (constraint != null) where =
constraint.toString();
                    Log.d("exp"+where, "******************* A VER 500
*****************");
                    Cursor cur = mDb.fetchCustomEvents("expense",
"reason
like '" + where + "%'");
                    Log.d("TOTAL="+cur.getCount(),
"******************* A VER
500 *****************");
                    return cur;
                }

                private Database mDb;
            }

        private static final String[] PEOPLE_PROJECTION = new String[]
{
                Database.KEY_REASON,
                Database.KEY_VALUE,
                Database.KEY_TAX
        };

On Nov 6, 9:48pm, "Juan David Trujillo C." <[EMAIL PROTECTED]>


> 

3. SlideME: Sam 2.2 Release

4. Ksoap probleme!!! rejected Lorg/ksoap2/transport/ServiceConnectionMidp;

5. simulate key press

6. Network traffic monitoring

7. Problem with orientation changes in subactivity