Hey everybody,
I m writing a small social networking app, and one of the features I included is the ability to upload a picture to a server to be used as your "profile picture". I did this by starting an ActivityForResult with this intent:
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
System.out.println("STARTED IT HERE");
startActivityForResult(Intent.createChooser(intent,"Select Picture"), SELECT_PICTURE);
这让用户选择从接受这种名词(我说是Gallery和Astro)的任何地方获得URI图像。 我有处理所有问题的法典,它的所有作品(除了在我从画廊中看到形象时带有外观感的问题之外,还有另一个专题:) 我的问题是,我怎么能这样说:
intent.setType("image/jpeg");
因为我只想让用户上载jpegs?
Thanks!