M Mostez Well-Known Member Licensed User Longtime User Aug 6, 2021 #1 I use this code to share plain text, it works ok with SMS, and whatsapp, but when sharing text with bluetooth it sends the text as html file! the problem is I use the same sub for sharing text with most of well known applications, but it is a problem with bluetooth. B4X: Dim In As Intent In.Initialize(In.ACTION_SEND, "") In.PutExtra("android.intent.extra.TEXT", tMsg) In.SetType("text/plain") StartActivity(In) TIA
I use this code to share plain text, it works ok with SMS, and whatsapp, but when sharing text with bluetooth it sends the text as html file! the problem is I use the same sub for sharing text with most of well known applications, but it is a problem with bluetooth. B4X: Dim In As Intent In.Initialize(In.ACTION_SEND, "") In.PutExtra("android.intent.extra.TEXT", tMsg) In.SetType("text/plain") StartActivity(In) TIA
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2021 #2 This code looks correct. The behavior eventually depends on the third party app that handles the intent. Upvote 0
This code looks correct. The behavior eventually depends on the third party app that handles the intent.
M Mostez Well-Known Member Licensed User Longtime User Aug 8, 2021 #3 is it possible to exclude bluetooth from sharing intent? and how? TIA Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Aug 8, 2021 #4 Not really. You can build the list yourself with PackageManager.QueryIntentActivities but it is not really practical. Upvote 0
Not really. You can build the list yourself with PackageManager.QueryIntentActivities but it is not really practical.