This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.provider.Contacts.People; | |
private void getColumnData(Cursor cur){ | |
if (cur.moveToFirst()) { | |
String name; | |
String phoneNumber; | |
int nameColumn = cur.getColumnIndex(People.NAME); | |
int phoneColumn = cur.getColumnIndex(People.NUMBER); | |
String imagePath; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.provider.Contacts.People; | |
import android.database.Cursor; | |
String[] projection = new String[] {People._ID, | |
People._COUNT, | |
People.NAME, | |
People.NUMBER }; | |
// Get the base URI for the People table | |
// in the Contacts content provider. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.provider.Contacts.People; | |
import android.content.ContentUris; | |
import android.net.Uri; | |
import android.database.Cursor; | |
// Use the ContentUris method to produce the base URI | |
// for the contact with _ID == 3. | |
Uri myPerson = ContentUris.withAppendedId(People.CONTENT_URI, 3); | |
// Alternatively, use the Uri method to produce the base URI. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calc extends Activity { | |
public static final String PREFS_NAME = "MyPrefsFile"; | |
@Override | |
protected void onCreate(Bundle state){ | |
super.onCreate(state); | |
. . . | |
// Restore preferences | |
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calc extends Activity { | |
public static final String PREFS_NAME = "MyPrefsFile"; | |
@Override | |
protected void onCreate(Bundle state){ | |
super.onCreate(state); | |
. . . | |
// Restore preferences | |
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter android:label="@string/resolve_title"> | |
<action android:name="com.android.notepad.action.EDIT_TITLE" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.ALTERNATIVE" /> | |
<category android:name="android.intent.category.SELECTED_ALTERNATIVE" /> | |
<data android:mimeType="vnd.android.cursor.item/vnd.google.note" /> | |
</intent-filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<action android:name="android.intent.action.INSERT" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<data android:mimeType="vnd.android.cursor.dir/vnd.google.note" /> | |
</intent-filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<data android:mimeType="video/mpeg" android:scheme="http" . . . /> | |
<data android:mimeType="audio/mpeg" android:scheme="http" . . . /> | |
. . . | |
</intent-filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<action android:name="com.example.project.SHOW_CURRENT" /> | |
<action android:name="com.example.project.SHOW_RECENT" /> | |
. . . | |
</intent-filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
. . . | |
</intent-filter> |