Android Question Limit sharing files to BT only?

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try this:
B4X:
Dim i As Intent
Dim rp As RuntimePermissions
Dim folder As String = rp.GetSafeDirDefaultExternal("shared")
i.Initialize(i.ACTION_SEND, CreateFileProviderUri(folder, FileName))
Dim pm As PackageManager
For Each component As String In pm.QueryIntentActivities(i)
   If component.ToLowerCase.Contains("bluetooth") Then
       i.SetComponent(component)
       StartActivity(i)
       Exit
   End If
Next
 
Upvote 0
Top