L lymey Active Member Licensed User Longtime User Jul 5, 2013 #1 Hi, I have an app that uses the share menu to share some text, the text is dropped into the destination app just fine. But what I would like to do is to have that share capability without having to display the share menu each time. In other words, can I share with an app without using the share menu. I have tried starting intetent with put extras and that doesn't work. The other alternative would be to somehow automatically paste text in to the receiving app?? Thanks for any input you can give!
Hi, I have an app that uses the share menu to share some text, the text is dropped into the destination app just fine. But what I would like to do is to have that share capability without having to display the share menu each time. In other words, can I share with an app without using the share menu. I have tried starting intetent with put extras and that doesn't work. The other alternative would be to somehow automatically paste text in to the receiving app?? Thanks for any input you can give!
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2013 #2 What do you mean with "share menu"? Are you referring to the dialog that allows the user to select the target app? Upvote 0
What do you mean with "share menu"? Are you referring to the dialog that allows the user to select the target app?
L lymey Active Member Licensed User Longtime User Jul 5, 2013 #3 share menu Yes that's right! I should have said the chooser menu! (that pops up when you use the following code Code: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("text/*") Intent1.PutExtra("android.intent.extra.TEXT", txtInput.Text) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1) Upvote 0
share menu Yes that's right! I should have said the chooser menu! (that pops up when you use the following code Code: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("text/*") Intent1.PutExtra("android.intent.extra.TEXT", txtInput.Text) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1)
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2013 #4 You can use PackageManager.QueryIntentActivities to find all the apps that can handle your intent. The List returned holds the "component name" value of each app. You can then use it to launch a specific app. Upvote 0
You can use PackageManager.QueryIntentActivities to find all the apps that can handle your intent. The List returned holds the "component name" value of each app. You can then use it to launch a specific app.
L lymey Active Member Licensed User Longtime User Jul 5, 2013 #5 thank you! Thanks Erel, that was very helpful! :icon_clap: Upvote 0
T TsubasaOzora New Member Jul 13, 2013 #6 lymey said: Yes that's right! I should have said the chooser menu! (that pops up when you use the following code Code: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("text/*") Intent1.PutExtra("android.intent.extra.TEXT", txtInput.Text) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1) Click to expand... Hi, have some question. if i want to share a bitmap image , how do i do that ? PHP: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("image/*") Intent1.PutExtra("android.intent.extra.image", thisisbitmap) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1) i try this and the apps die Upvote 0
lymey said: Yes that's right! I should have said the chooser menu! (that pops up when you use the following code Code: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("text/*") Intent1.PutExtra("android.intent.extra.TEXT", txtInput.Text) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1) Click to expand... Hi, have some question. if i want to share a bitmap image , how do i do that ? PHP: Copy Dim Intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("image/*") Intent1.PutExtra("android.intent.extra.image", thisisbitmap) Intent1.WrapAsIntentChooser("Choose") StartActivity(Intent1) i try this and the apps die
Erel B4X founder Staff member Licensed User Longtime User Jul 14, 2013 #7 Please start a new thread for this question. Upvote 0