S susu Well-Known Member Licensed User Longtime User Jan 15, 2011 #1 I want to make a button that can share the content (sms, email, facebook...). I tried these code but failed, please help. Code: Copy Dim intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("plain/text") Intent1.PutExtra("text", Content.Text) StartActivity(Intent1)
I want to make a button that can share the content (sms, email, facebook...). I tried these code but failed, please help. Code: Copy Dim intent1 As Intent Intent1.Initialize(Intent1.ACTION_SEND, "") Intent1.SetType("plain/text") Intent1.PutExtra("text", Content.Text) StartActivity(Intent1)
Erel B4X founder Staff member Licensed User Longtime User Jan 16, 2011 #2 Try this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/*") i.PutExtra("android.intent.extra.TEXT", "this is the message") i.WrapAsIntentChooser("Choose") StartActivity(i) Upvote 0
Try this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/*") i.PutExtra("android.intent.extra.TEXT", "this is the message") i.WrapAsIntentChooser("Choose") StartActivity(i)
S susu Well-Known Member Licensed User Longtime User Jan 17, 2011 #3 Thanks Erel. I read about "intent" for hours but couldn't get a clue Upvote 0
Stulish Active Member Licensed User Longtime User Feb 3, 2013 #4 Hi, I have got a button on an app so the user can click to link the download page to facebook. Using the code below it all works fine and links the page, the problem i have is that it displays a list of all apps, i tried to set the component to com.facebook.katana so that it would use the facebook app, but it still displays all apps. is there a way so that it shows onlt facebook, or goes directly to facebook instead of displaying all apps. Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "http://www.b4x.com/") i.SetComponent("com.facebook.katana") StartActivity(i) Thanks Upvote 0
Hi, I have got a button on an app so the user can click to link the download page to facebook. Using the code below it all works fine and links the page, the problem i have is that it displays a list of all apps, i tried to set the component to com.facebook.katana so that it would use the facebook app, but it still displays all apps. is there a way so that it shows onlt facebook, or goes directly to facebook instead of displaying all apps. Code: Copy Dim i As Intent i.Initialize(i.ACTION_SEND, "") i.SetType("text/plain") i.PutExtra("android.intent.extra.TEXT", "http://www.b4x.com/") i.SetComponent("com.facebook.katana") StartActivity(i) Thanks
Erel B4X founder Staff member Licensed User Longtime User Feb 3, 2013 #5 You are not setting the component correctly. It should include the activity name. Upvote 0
ChrShe Member Licensed User Longtime User Mar 27, 2013 #6 I'm using the code that Stulish posted to get my app to be able to share to more than email. Now I'm wondering if there's a way to intercept the Share Using dialog so that I could do specific things depending on what they want to share to...? i.e. If sharing to Facebook or G+, just push the link. If sharing via email/gmail, create an email body/subject/attachement. Many thanks! Chris Upvote 0
I'm using the code that Stulish posted to get my app to be able to share to more than email. Now I'm wondering if there's a way to intercept the Share Using dialog so that I could do specific things depending on what they want to share to...? i.e. If sharing to Facebook or G+, just push the link. If sharing via email/gmail, create an email body/subject/attachement. Many thanks! Chris
Erel B4X founder Staff member Licensed User Longtime User Mar 28, 2013 #7 You can get a list of the supported applications with the the updated phone library (v2.01): http://www.b4x.com/forum/additional...s/27435-phone-library-v2-01-a.html#post159054 Upvote 0
You can get a list of the supported applications with the the updated phone library (v2.01): http://www.b4x.com/forum/additional...s/27435-phone-library-v2-01-a.html#post159054
ChrShe Member Licensed User Longtime User Mar 30, 2013 #8 Is there a way, you can think of, to do it without the Phone library? It seems...If I add the Phone library, the Play Store won't make my app available to WiFi only devices. Thanks! Upvote 0
Is there a way, you can think of, to do it without the Phone library? It seems...If I add the Phone library, the Play Store won't make my app available to WiFi only devices. Thanks!
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2013 #9 This is not related to the Phone library. Google Play filters applications based on the manifest file. Adding the Phone library (or any other library) doesn't add anything to the manifest. Only when you add an object to your code that requires a specific permission the permission is added. Upvote 0
This is not related to the Phone library. Google Play filters applications based on the manifest file. Adding the Phone library (or any other library) doesn't add anything to the manifest. Only when you add an object to your code that requires a specific permission the permission is added.
ChrShe Member Licensed User Longtime User Mar 30, 2013 #10 OOOHHH!!! That makes sense...and makes my morning easier. :sign0060: Thank you! Upvote 0