A wrap for this project https://github.com/RF177/Soundify
Data transmission via sound waves
Unfortunately it is not accurate but anyway here it is
soundify
Author: SMM
Version: 0.01
Sample
Great results
Data transmission via sound waves
Unfortunately it is not accurate but anyway here it is
soundify
Author: SMM
Version: 0.01
- soundify
Events:- _onreceivedata (data() As Byte)
- Initialize (EventName As String)
- IsInitialized As Boolean
- bytesToString (msg() As Byte) As String
- send (msg() As Byte)
- startListening
- stopListening
- stringToBytes (msg As String) As Byte[]
- android.permission.RECORD_AUDIO
Sample
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim dd As soundify
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
dd.Initialize("dd")
End Sub
Sub Activity_Click
dd.startListening
End Sub
Sub dd_onreceivedata(data() As Byte)
Log(dd.bytesToString( data))
title_it( dd.bytesToString( data))
' dd.stopListening
End Sub
Sub title_it(t As String)
Activity.Title=t
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_LongClick
dd.send(dd.stringToBytes("Hello"))
End Sub
Great results
B4X:
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
8###8####llo
#8888####ello
#888##8##8#8###HHllo
##88###8#88##8##888VHelloo
######888#888$#8wn7?88W?)<D88
0888&AcD88##-pfdHHlll4��^))aaaaaaaa&##^Hello
��98M@3E888##88))Hllo
Hlllo
** Activity (main) Pause, UserClosed = false **