Using Intent.ACTION_PICK for specific path

前端 未结 2 1367
梦毁少年i
梦毁少年i 2020-11-29 11:12

I am trying to use Android gallery to pick image. Launching gallery is easy for that purpose

Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photo         


        
2条回答
  •  再見小時候
    2020-11-29 11:33

    Sorry, no this is not possible.

    Also you are using this Intent protocol wrong. As per http://developer.android.com/reference/android/content/Intent.html#ACTION_PICK this protocol expects that you put the content: URI of the data set you want the picker to select from.

    That said, you should consider ACTION_PICK deprecated. The modern action is ACTION_GET_CONTENT which is much better supported; you will find support of ACTION_PICK spotty and inconsistent. Unfortunately, ACTION_GET_CONTENT also does not let you specify a directory.

提交回复
热议问题