В какую сторону рыть.. только учусь ((
ContentResolver contentResolver = context.getContentResolver(); Uri uri = Data.CONTENT_URI; String[] projection = new String[] { PhoneLookup._ID }; String selection = StructuredName.DISPLAY_NAME + " = ?"; String[] selectionArguments = { "имя" }; Cursor cursor = contentResolver.query(uri, projection, selection, selectionArguments, null); if (cursor != null) { while (cursor.moveToNext()) { return cursor.getString(0); } } return "not found";
Обсуждают сегодня