Melinda Green
Melinda Green

Reputation: 2140

Reading Owner Info

Android users can enter arbitrary text into Settings > Security > Owner Info, at least in Jelly Bean. How can I read that string from an app?

Upvotes: 1

Views: 592

Answers (1)

user2163649
user2163649

Reputation:

try this:

final String[] SELF_PROJECTION = new String[] { Phone._ID, Phone.DISPLAY_NAME, };

Cursor is :

Cursor cursor = activity.getContentResolver().query( Profile.CONTENT_URI, SELF_PROJECTION, null, null, null);

now just do a simple cursor.moveToFirst():

and then fetch the contact id via cursor.getString(0) and the contact name via cursor.getString(1)

Upvotes: 3

Related Questions