Posts

Showing posts from 2011

Android: Unable to dlopen(/data/data/ ): Cannot load library: link_image[1995]

we cant link against the system libssl and libcrypto libraries, we must include our own as a static library or as a shared library. if using a shared library we must change their names from the default

PopUP Notification for new messages

http://code.google.com/p/android-smspopup/source/checkout

Android: command line actions with telnet

telnet for localhost(emulator) telnet localhost 5554 to make a call: gsm call 900800 to send SMS: sms send 890890 text

Get Groups from phone

GROUPS: { private Cursor getGroups() // Run query Uri uri = ContactsContract.Groups. String[] projection = ContactsContract.Groups. ContactsContract.Groups. CONTENT_URI ; new String[] { _ID , TITLE }; String selection = ContactsContract.Contacts. ( String sortOrder = ContactsContract.Groups. IN_VISIBLE_GROUP + " = '" + mShowInvisible ? "0" : "1" ) + "'" ; TITLE + " COLLATE LOCALIZED ASC" ; //return managedQuery( uri , projection, selection, selectionArgs, sortOrder); } Cursor groupCursor = getGroups(); groupCursor.moveToFirst(); { Log. e ( i++; groupCursor.moveToNext(); } return managedQuery(uri, projection, null , null , sortOrder); while ( i < groupCursor.getCount() ) groupNames [i] = groupCursor.getString(groupCursor.getColumnIndex(ContactsContract.Groups. TITLE )); "GROUP " , " " + groupNames [i]);

Get Contacts from phone...

Contacts: { private Cursor getContacts() // Run query Uri uri = ContactsContract.Contacts. String[] projection = ContactsContract.Contacts. ContactsContract.Contacts. CONTENT_URI ; new String[] { _ID , DISPLAY_NAME }; String selection = ContactsContract.Contacts. ( String sortOrder = ContactsContract.Contacts. IN_VISIBLE_GROUP + " = '" + mShowInvisible ? "0" : "1" ) + "'" ; DISPLAY_NAME + " COLLATE LOCALIZED ASC" ; //return managedQuery( uri , projection, selection, selectionArgs, sortOrder); } Cursor cursor = getContacts(); i = 0; cursor.moveToFirst(); { nameL = numberL = groupL = nameL = cursor.getString(cursor.getColumnIndex(ContactsContract.Data. Log. e ( String contactId = cursor.getString(cursor.getColumnIndex( ContactsContract.Contacts. Cursor phones = getContentResolver().query( ContactsContract.CommonDataKinds.Phone. numberL = phones.getString( phones.getColumnIndex( ContactsContra