1

I want to give user an interface so that he can mark folders and at the back-end I will get their path. But I don't have any idea how to do this. Currenty I am starting an intent to choose image from gallery then save its path. Here is my code.

Intent intent = new Intent();
    intent.setType("image/*");
    intent.setAction(Intent.ACTION_GET_CONTENT);
    startActivityForResult(Intent.createChooser(intent, "Select an Image"),1);

But I want instead of image chooser it should display all the folders and user sould mark those, any ideas?

4

1 に答える 1

1

ファイル/フォルダー ピッカー API については、以下のリンクを確認してください。

この API を使用するだけで、onActivityResult で、選択したフォルダー/ファイル パスを取得できます。

カスタム ピッカーを実装したい場合は、このチュートリアルをご覧ください。開始に関するヒントが得られます。

于 2013-01-23T09:09:55.487 に答える