Sharing image to applock vault using intent


Sharing image to applock vault using intent



I have been working on a project on android gallery application. I have implemented image sharing using intents which is working fine with all apps images are being shared there but when it comes sharing images to AppLock to store them into vault it is not working.



When I share image to AppLock the activity opens and closes without showing anything. I am using the following code to share images.


private Intent createShareIntent()
{
Intent intent=new Intent(Intent.ACTION_SEND);
intent.setType("image/*");
File image=new File(currentImageUri.getPath());
Uri uri=FileProvider.getUriForFile(this,this.getApplicationContext().getPackageName()+".GenericFileProvider",image);
intent.putExtra(Intent.EXTRA_STREAM,uri);
return intent;
}



I have almost searched everywhere for this but could not find any help.





are you getting any error ??
– Hemant Parmar
Jun 30 at 9:20





no there are no errors applock activity simply opens and closes without showing anything.
– Bilal Yasin
Jun 30 at 9:24





You can refer to this link, might be helpful. stackoverflow.com/questions/7661875/…
– Ranjeet Luhar
Jun 30 at 9:24





This method wouldn't work because if is exposing file:/ uri to external apps which doesn't work after Android M. FileProvider had to be used.
– Bilal Yasin
Jun 30 at 9:29









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Extract Id from Twitch Clip URL

Joe Torre

2