2011-01-26 34 views

回答

4

我找到了解決方案。 您基本上在清單中告訴哪個活動可以處理合並的聯繫人。這樣當你選擇一個MIME類型的合併,在使用這種MIME類型的活動您選擇:

 <intent-filter android:icon="@drawable/hyves"> 
      <action android:name="android.intent.action.VIEW" /> 
      <category android:name="android.intent.category.DEFAULT" /> 
      <data android:mimeType="vnd.android.cursor.item/vnd.hyves.profile" /> 
     </intent-filter> 

然後,當活動開始,你可以通過執行獲得的接觸: 光標CUR = getContentResolver() .query(getIntent()。getData(),null,null,null,null);

+1

嗨 謝謝我發現這非常有用,但我想請求你,如果你可以提供你如何設置你的mimeType(vnd.hyves.profile)以及如何處理你的intent和ContentsResolver子類。 謝謝。 – vsm 2011-05-19 21:36:17