[Android] Learn how to create a real time line graph with MPAndroidChart

Sylvain Saurel · 108K views · 2015 · 28:02

Open on YouTube

Software (other)Data visualization & information designtutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the reference example when building live-updating charts in Android apps, whether with MPAndroidChart or similar libraries.

Recommended by 0 people across 0 different months, 2017 to 2018.

What it is

A 28-minute Android tutorial by Sylvain Saurel that walks through building a real-time line graph with the open source MPAndroidChart library. It follows an accompanying blog post with full source code.

What people said

Cites Excelsior1024 · 2017-03 · Stack Overflow · on “MPAndroidchart mChart set to null between onCreate and onResume”

I am trying to use MPAndroidChart to graph real-time data and am following the code examples here [this video] and here [LINK] . I have had charts with static data working in the past. Following the first example I initialize my globally declared mChart variable in the onCreate method. However, when onResume is invoked, the mChart variable is set to NULL again and my addEntry() method fails due to a NULL exception. What do I need to do to keep mChart from being set to NULL (other variables from the XML are initialized in onCreate and retain their values in onResume). BTW, this app also has a BLE service running with source code that originated from the AndroidStudio BLE sample. This is what mChar

Cites daniel moreira · 2018-05 · Stack Overflow · on “Make real time multi line graph with androidplot”

I would like to know if it's possible to make a real time multiple line graph using androidplot, like this [this video] but with 2 lines.And if so if could provide how to do it. Thanks

Cites user10769497 · 2018-12 · Stack Overflow · on “How to fix the error in logcat related with FATAl activity and audioFlinger”

I'm new to android world.I try to build a real time graph but there is no error with build and sync but their is an error with log cat.I don't know how to solve it. This is my AndroidManifest code. <?xml version="1.0" encoding="utf-8"?> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:launchMode="singleTop" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter