androidѧϰ֮ʵʱÎļþ¼ÐµÄ´´½¨
?public class Activity01 extends Activity{public void onCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);// setContentView(R.layout.main);// ÅжÏÊÇ·ñ´´½¨ÊµÊ±Îļþ¼Ðif (getIntent().getAction().equals(LiveFolders.ACTION_CREATE_LIVE_FOLDER)){Intent intent = new Intent();// ÉèÖÃÊý¾ÝµØÖ·intent.setData(Uri.parse("content://contacts/live_folders/people"));// ÉèÖõ±ÎÒÃǵ¥»÷Ö®ºóµÄʼþ£¬ÕâÀïµ¥»÷Ò»¸öÁªÏµÈ˺󣬺ô½Ðintent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_BASE_INTENT, new Intent(Intent.ACTION_CALL, ContactsContract.Contacts.CONTENT_URI));// ÉèÖÃʵʱÎļþ¼ÐµÄÃû×Öintent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_NAME, "µç»°±¾");// ÉèÖÃʵʩÎļþ¼ÐµÄͼ±êintent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_ICON, Intent.ShortcutIconResource.fromContext(this, R.drawable.contacts));// ÉèÖÃÏÔʾģʽΪÁбíintent.putExtra(LiveFolders.EXTRA_LIVE_FOLDER_DISPLAY_MODE, LiveFolders.DISPLAY_MODE_LIST);// Íê³ÉsetResult(RESULT_OK, intent);}else{setResult(RESULT_CANCELED);}finish();}}?ÔÚmainfest.xmlÖеÄÅäÖãº
?
?
?<activity android:name=".Activity01"
????????????????? android:label="@string/app_name">
??????????? <intent-filter>
???? ?<action android:name= "android.intent.action.CREATE_LIVE_FOLDER" />
????<category android:name= "android.intent.category.DEFAULT" />
??????????? </intent-filter>
??????? </activity>
?
ÐèÒªÔÚÖ÷Ò³ÃæÖа´menu¼ü£¬È»ºóµã»÷Ìí¼ÓÎļþ¼ÐµÄ·½Ê½Ìí¼ÓʵʱÎļþ¼Ð