2010-10-24 23 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。祝你好运!

相关问题