I'm creating an app that needs to share images, however, this sharing should only occur for some specific applications (facebook, instagram, linkedin and whatsapp). I've seen several commercial applications that, when sharing an image, limit those who can receive the image. How to do this?
You cannot filter only this applications use the intent chooser.
You need to create your own screen to share (and use the intents to every app), like this:
You cannot filter only this applications.
You need to create your own screen to share (and use the intents to every app), like this: View attachment 140953
I understand. It's okay to create an intent for each one. But honestly I don't know how to do it... could you give me any tips or examples? Thank you very much for your reply!
Dim inten As Intent
inten.Initialize(inten.ACTION_SEND,"")
inten.SetType("image/*")
inten.PutExtra("android.intent.extra.STREAM", Starter.Provider.GetFileUri("myimage.jpg"))
inten.SetPackage("com.instagram.android")
StartActivity(inten)
This is similar to others apps and there are a lot of code show how to share in the forum.
Dim inten As Intent
inten.Initialize(inten.ACTION_SEND,"")
inten.SetType("image/*")
inten.PutExtra("android.intent.extra.STREAM", Starter.Provider.GetFileUri("myimage.jpg"))
inten.SetPackage("com.instagram.android")
StartActivity(inten)
This is similar to others apps and there are a lot of code show how to share in the forum.
Wonder! Thank you very much indeed for the help. I'm new to mobile programming and you helped me a lot! I'm going to implement it... So there's no way to create a list of packages to receive (showing the user a list of the desired ones when sharing, right?)
I need to share an image via only Tweet. Here is my code Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("image/*"); if (mInsertableToGallery) {
I need to share an image via only Tweet. Here is my code Intent shareIntent = new Intent(Intent.ACTION_SEND); shareIntent.setType("image/*"); if (mInsertableToGallery) {