bitmap - how to allow users to choose photos only from gallery not from photos app? -


here code

 intent intent = new intent(intent.action_pick,                     android.provider.mediastore.images.media.external_content_uri);             intent.settype("image/*");              intent.putextra(intent.extra_local_only, true);              mcontext.startactivityforresult(                     intent.createchooser(intent, "select file"), open_gallery_request);             dismiss(); 

app crashes if choose images photos stored in cloud fixed issue checking file path if user choose image cloud toast message download image

but there way restrict users choose image gallery in advance

are looking this

intent intent = new intent(); intent.settype("image/*"); intent.setaction(intent.action_get_content); intent.putextra(intent.extra_local_only, true); startactivityforresult(intent.createchooser(intent, "complete action using"), photo_picker_id); 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -