-4

I am new to Android.

I'm trying to build an Image player.
I ask the user for an image they want to open.
But I don't know the way how to ask the user to provide that URL.

Please Help me....

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
  • English is not a prob. But problem is not clear enough at least to me . Edit your question with more details what you have done so far and what the goal. – ADM Dec 08 '17 at 08:49
  • 3
    Welcome to Stack Overflow. Please read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) and [What topics can I ask about here?](https://stackoverflow.com/help/on-topic). Research, try something, add your code & point your problem. – pirho Dec 08 '17 at 08:49
  • check this: https://stackoverflow.com/questions/18220152/opening-an-image-using-intent-action-pick – Rafal Malek Dec 08 '17 at 08:53
  • use a file chooser – Phantômaxx Dec 08 '17 at 09:16
  • thanks for your advise, i will note that – Draggnell Natsu Dec 08 '17 at 13:05

1 Answers1

0
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(intent, REQUEST_CODE_LOAD_IMAGE);
Harsh Singhal
  • 567
  • 4
  • 12
  • While this code snippet may solve the question, [including an explanation](http://meta.stackexchange.com/questions/114762/explaining-entirely-code-based-answers) really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. – Isma Dec 08 '17 at 10:25
  • thanks a lot, I got it – Draggnell Natsu Dec 11 '17 at 07:01