Rushabh Bhatt
Rushabh Bhatt

Reputation: 223

Plotting android recording samples's amplitude on moving graph RealTime

I'm developing a recording app, for which I am trying plot amplitude of audio recording samples against time on Android View similar to below image.

The graph should move with time towards the left side of the screen.

enter image description here

I tried using LineChart of MPChart Library but still, the result is not as expected.

MPChart homepage has a screenshot of such graph, but couldn't figure it how to implement.

Please help. Thank you.

Upvotes: 1

Views: 2734

Answers (1)

Misha Akopov
Misha Akopov

Reputation: 13027

You can use LineChart for that, here is official RealtimeLineChartActivity:

Oficial RealtimeLineChartActivity example

Like in the sample, you should feed (feedMultiple method) it with data from other Thread, periodically (Runnable)

Hope that helps

Upvotes: 2

Related Questions