Android Question smart button

jchal

Active Member
Licensed User
Longtime User
hi all
i am trying to find relevant information how can i make my own smart button like com.helloklick.android
com.emniuen.easmartpower where can i start is the an example?
 

jchal

Active Member
Licensed User
Longtime User
hi there
i am using this example
https://www.b4x.com/android/forum/threads/audio-library-v1-5-new-audiostreamer-object.30550/
trying to read the mic inmput
i try to modificate the code to the one below
B4X:
Sub streamer_RecordBuffer (Buffer() As Byte)
    'collect the recording data
    buffers.Add(Buffer)
    For Each b() As Byte In buffers
'    Log(${b}$)
    Next
End Sub
the problem is that i did not suceed with the log , possibly i am doing some syndax error and secon when i peress the head set button what i must expect in b to be the value?
 
Upvote 0

jchal

Active Member
Licensed User
Longtime User
i have altered the code to
B4X:
Sub streamer_RecordBuffer (Buffer() As Byte)
    Dim z As String
    'collect the recording data
    buffers.Add(Buffer)
    For Each b() As Byte In buffers
        z= BytesToString (b,1,10,"UTF-8")
    Log(z)
    Next
End Sub
but i get results that i cannot read
i was not able to declear byteconverter , can you please tell me how do i declear byteconverter?
 

Attachments

  • audiostream.png
    audiostream.png
    117.4 KB · Views: 147
Last edited:
Upvote 0
Top