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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -