2010-10-24 42 views
1

我想使用選擇器,所以我不必創建一個選擇器對話框。也許這是錯誤的構造或小部件要使用。發生的事情是,我提供的意向列表被插入到選擇器對話框中,但我的設備上的所有其他應用程序也是如此。然後,如果我使用後退按鈕,應用程序「結束」。如何使用Android Intent.createChooser()?

的調用是:

Intent intentChooser = Intent.createChooser(intentDocumentView, "Choose A Chapter"); 

Parcelable [] parcelable = new Parcelable [2]; 
parcelable[0] = new LabeledIntent(intentDoc0, "com.mobibob.myapp", "Title 0", 0); 
parcelable[1] = new LabeledIntent(intentDoc1, "com.mobibob.myapp", "Title 1", 0); 
intentChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, parcelable); 
int whichDocument = RESULT_FIRST_USER; 
startActivityForResult(intentChooser, whichDocument); 

我需要在intentChooser指定更多?類別?標誌?演員?

回答

0

這已經有一段時間了,但我有類似的問題,谷歌讓我到你的文章。只是想補充一點,我能夠在這裏使用建議找到解決方案 - >twitter integration on android app。祝你好運!