Hi All,
I need to share a normal text file via bluetooth. I have this code:
This code works well on android 7.0, sdk version 24, but not on android 6.0.
On android 6.0 the intent chooser appear, I can select bluetooth, but nothing happen, no error, no exception (no file sending).
In 7.0 I can select a target device and the file sending is ok. So I think my manifest is ok, since good working.
Can you help me what to do in older androids?
thank
Steven
I need to share a normal text file via bluetooth. I have this code:
B4X:
Log($"Megosztva intenttel v.${phone.SdkVersion}."$)
If phone.SdkVersion >= 24 Then
in.Initialize(in.ACTION_SEND, Starter.Provider.GetFileUri(csvnev))
in.SetType("text/plain")
in.PutExtra("android.intent.extra.STREAM", Starter.Provider.GetFileUri(csvnev))
in.Flags = Bit.Or(in.Flags, 1) 'FLAG_GRANT_READ_URI_PERMISSION
Else
in.Initialize(in.ACTION_SEND, "file://" & File.Combine(Starter.Provider.SharedFolder, csvnev))
in.SetType("text/plain")
End If
in.WrapAsIntentChooser("Válasszon megosztást!")
StartActivity(in)
On android 6.0 the intent chooser appear, I can select bluetooth, but nothing happen, no error, no exception (no file sending).
In 7.0 I can select a target device and the file sending is ok. So I think my manifest is ok, since good working.
Can you help me what to do in older androids?
thank
Steven