I'm trying to develop an android app at the moment. Right now I want to get the phone number of a selected contact. I enter my contact list with ContactsContract, and I also get the data of a contact by the Cursor object I use. My Problem is I get the first contact every time because of the .moveToFirst() method I use. Of course I tried to do it without this method, but then cursor.getPosition() returns '-1', so I get an error in the .getColumnIndex() method. I also tried to use .moveToPosition, but I don't know how to get the right position of my selected contact.
Can anyone help me?