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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -