[Working Code Oct 2019 ] Real Time Accelerometer Data Plot in Android using MPAndroidChart Library

Тәжірибелік нұсқаулар және стиль

[Updated Oct 2019] Download full working code from the GitHub repository.
github.com/laxmimerit/Real-Ti...
Watch the full video to understand the code. I have tested the GitHub code on 17 Oct, 2019 and updated the code and it is now working again. Please do not forget to like and subscribe to this channel.
Keywords:
MPAndroidChart Library Example
Using these libraries, drawing charts on Android could never be simpler. MPAndroidChart library works on Android API 8 and above, but if you are using animations, it works on API 11 and above. Animations is one of the greatest features apart from easy data input, this library could have. Some how I feel animations give good user experience to an application. Through MPAndroidChart library, we can use more than 25 inbuilt animations, also can define custom animations. When making charts on Android MPAndroidChart library which falls under the Apache 2.0 license, we can draw a:
Simple Bar Chart
Grouped Bar Chart
Horizontal Bar Chart
Simple Line Chart
Line Chart with Cubic Lines
Grouped Line Chart
Combined Line and Bar Chart
Pie Chart
Scatter Chart
Candlestick Chart
Radar Chart
******************************************
Please subscribe this channel to get live updates directly into your inbox whenever I upload a new video.
------------------------------------------------------------
Support us on KGPTalkie Facebook Page
/ kgptalkie
************************************************
Please don't forget to LIKE this video and SUBSCRIBE this channel. Thanks for watching.
********************************************
mpandroidchart,
mpandroidchart real time,
mpandroidchart horizontal bar chart,
mpandroidchart animation,
mpandroidchart line chart tutorial,
mpandroidchart real time graph,
mpandroidchart sqlite,
mpandroidchart tutorial,
mpandroidchart line chart,
mpandroidchart android studio,
mpandroidchart barchart,
mpandroidchart android,
mpandroidchart android example,
mpandroidchart bar graph,
mpandroidchart bar chart labels,
mpandroidchart bar chart example,
mpandroidchart bar chart scroll,
mpandroidchart bar chart tutorial,
mpandroidchart candlestick chart,
mpandroidchart candlestick,
mpandroidchart chart example,
mpandroidchart dynamic data,
mpandroidchart date,
mpandroidchart date x axis,
mpandroidchart demo,
mpandroidchart database,
mpandroidchart example,
mpandroidchart example pie chart,
mpandroidchart example code,
mpandroidchart firebase,
mpandroidchart grouped bar chart,
mpandroidchart horizontal bar chart example,
mpandroidchart highlight,
mpandroidchart in android,
mpandroidchart json,
mpandroidchart live data,
mpandroidchart linedata,
mpandroidchart live chart,
mpandroidchart labels,
mpandroidchart linechart multiple dataset,
mpandroidchart multiple line chart example,
mpandroidchart multiple line chart,
mpandroidchart marker,
mpandroidchart multiple lines,
mpandroidchart onvalueselected,
mpandroidchart pie chart,
mpandroidchart pie chart tutorial,
mpandroidchart pie chart example,
mpandroidchart pie chart animation,
mpandroidchart real time chart,
mpandroidchart radar chart,
mpandroidchart real time example,
mpandroidchart scrollable,
mpandroidchart stacked bar chart,
mpandroidchart stacked bar chart example,
mpandroidchart tutorial better than android graphview,
mpandroidchart tutorial better than android graphview 3- linechart using mpandroid 1/3,
mpandroidchart tutorial android,
mpandroidchart time series,
mpandroidchart tutorial pie chart,
mpandroidchart time x axis,
mpandroidchart xaxis labels,
mpandroidchart xaxis label date,
mpandroidchart youtube,
mpandroidchart zoom,
mpandroidchart 2 lines
graphview,
graphview android,
graphview android studio,
graphview real time,
graphview bar graph,
graphview tutorial,
graphview real time example,
graphviewseries,
graphview java,
graphview example,
graphview swift,
graphview example in android,
graphview android download,
graphview in android,
graphview in android studio,
graphview library android,
graphview android tutorial,
graphview viewport,
graphview vs mpandroidchart,
graphview zoom

Пікірлер: 88

  • @KGPTalkie
    @KGPTalkie4 жыл бұрын

    Updated Working Code on 17th Oct 2019. Watch other series on Android here: kzread.info/dash/bejne/op-ImaaOYbzVabQ.html

  • @cheddargt

    @cheddargt

    4 жыл бұрын

    Hey, good job on deleting the code from github.

  • @kartikaymahajan9591

    @kartikaymahajan9591

    3 жыл бұрын

    hey please tell how to draw real time graph eg. y=sin(t) . the app should ask input from the user for which function the user wants to plot graph. i have been given this project. deadline is 7 days. please help

  • @atharvasawarkar9086
    @atharvasawarkar90863 жыл бұрын

    Thank You! Very Well Explained👍

  • @razvanconstantinandrei1483
    @razvanconstantinandrei14836 жыл бұрын

    Do you happen to have the code in a repository ? I implemented your solution but is not working

  • @janeikeland7446
    @janeikeland74466 жыл бұрын

    hello and thanks for Your great tutorials. ref 17:18 into video:if(set == null) The set parameter is not recognized. Is there another approach to check/create new set? Thank You and greetings from Norway

  • @alickcampbell8915
    @alickcampbell89153 жыл бұрын

    Hello, thank you for the Tutorial. Can you do a tutorial showing how to do a real time bar chart plot?

  • @gerardjensenolmos7862
    @gerardjensenolmos78624 жыл бұрын

    So with this idea, you just add values for ever, but that would stop the aplication due to no ram, so how can you delete the "trash data", the one that is not being showed? Thanks

  • @luismanuelnietohinojosa8289
    @luismanuelnietohinojosa82895 жыл бұрын

    excellent tutorial, congratulations I have followed the video without audio but I didn´t have troubles with the final result. Maybe to the people, just try ............. thread.start(); :)

  • @parulaggarwal3615
    @parulaggarwal36155 жыл бұрын

    At what rate data ia plotted ..how many samples per second? Can we plot 8000 samples per second?

  • @siddharthbhonsle9514
    @siddharthbhonsle95145 жыл бұрын

    thank you so much.. it works for me could you make a video on how to transfer the data in a csv file. :)

  • @yashrdoshi

    @yashrdoshi

    3 жыл бұрын

    Hey Siddharth ! Were you able to transfer the data in csv file?

  • @viviansouza8374
    @viviansouza83745 жыл бұрын

    Hi! is there a way to starting ploting from left to right? thx

  • @user-tu2zc9em5s
    @user-tu2zc9em5s4 жыл бұрын

    What can I do if I want to use multiple line(2) on this chart?

  • @KarjolGT
    @KarjolGT3 жыл бұрын

    How to change the direction of the graph from left to right. Now the graph direction in the given example is right to left

  • @naseemurrahman3081
    @naseemurrahman30813 жыл бұрын

    This is an amazing but now I have a question that how i can store the accelerometer data in database.

  • @jamestanaka686
    @jamestanaka6863 жыл бұрын

    Why do we need to use the thread?

  • @Larry_Druhall
    @Larry_Druhall5 жыл бұрын

    Thank you for posting this informational and interesting tutorial. I was excited to clone the project and run it. When cloning from GitHub with Android Studio 3.4 0 get the following errors. Have you tried cloning it and running it in Android Studio 3.4 0 with stock settings? 1. 14:15 Gradle sync failed: Operation timed out (Connection timed out) (1 m 15 s 287 ms) 2. 14:15 Error Loading Project: Cannot load 2 modules Specifically, for error 2 above, two app.iml files are missing. Closing the project and re opening it does not generate these files as expected. I am new to Android Studio and don't want to spend a lot of time on this. Any advice would be appreciated but not expected. Thanks again for your incredible tutorial.

  • @KGPTalkie

    @KGPTalkie

    5 жыл бұрын

    Hi, You are not able to connect with the internet. Are working behind the proxy?

  • @Larry_Druhall

    @Larry_Druhall

    5 жыл бұрын

    @@KGPTalkie Thanks for the reply. There are multiple issues associated with MPAndroidChart. It looks like the MPAndroidChart GitHub site is different from when you made the video. Can you still clone this project from your Github site github.com/laxmimerit/Real-Time-Accelerometer-Data-Plot and get it to run from scratch? I think I will use other methods for graphics. This is taking so much time that I would be better off using the root Java drawing tools. Or GraphView. It must be challenging for you to create such a great tutorial and have it quit working for others due to changes made by Android Studio or 3rd party sites like MPAndroidChart. The only way this would be viable for me is if I could import your Github into Android Studio and be able to build and run it. I tried all the simple things and will go on to other things unless you advise you have checked it and adjusted your Github so it now works. Two iml files are apparently missing from your Git and there are issues connecting to MPAndroidChart. Great tutorial anyhow, thank you, I learned a lot. Thanks again.

  • @yaoyangcai8939
    @yaoyangcai89395 жыл бұрын

    It's not working for TYPE_LIGHT sensor.

  • @akiradawe
    @akiradawe5 жыл бұрын

    I HAD THE FOLLOWING ERROR "More than one file was found with OS independent path 'META-INF/proguard/androidx-annotations.pro" WITH THE TUTO, IF ANY ONE FACE IT FIX IT WITH: putting the following in your gradle file as a temporary workaround while we fix the issue in alpha10: android { packagingOptions { exclude 'META-INF/proguard/androidx-annotations.pro' } } into the android build.gradle the things should work properly.

  • @richsymmonds8243
    @richsymmonds82436 жыл бұрын

    This app works perfectly on the Nexus 5 emulator that comes packaged with Android Studio, but when I try to run it on my Galaxy S5 or with an S5 emulator, I get an error message that the "app has stopped working". Any help resolving this would be appreciated. Great tutorial by the way!

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Richard Symmonds please see debug log and post that here.

  • @harshithavenkatakumar6652

    @harshithavenkatakumar6652

    6 жыл бұрын

    I am getting the same error.. did you find any solutions?

  • @raajmathankumar3632

    @raajmathankumar3632

    5 жыл бұрын

    Pls sent me a code @ raajmathan98@gmail.com

  • @shuchismitabagchi801
    @shuchismitabagchi8012 жыл бұрын

    Can this be done in python for this app?

  • @umayajassim7539
    @umayajassim75396 жыл бұрын

    App keeps crashing. Could you provide a link to your GitHub so we may inspect the code?

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Is it working on Emulator?

  • @alexlooking122

    @alexlooking122

    6 жыл бұрын

    You should inspect his code from the video as it gets changed at the end, this could be the problem ;) I had the same problem until watched the code from the video again and yeah would be really useful if the author would provide a Github link to his final code.

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @weili3188
    @weili31885 жыл бұрын

    Can we do this in ios ?

  • @user-hj2ed5pe6j
    @user-hj2ed5pe6j5 жыл бұрын

    Doesn't work for me. It continues to plot the first data, that doesn't vary at all.

  • @fatonaoladimeji9697

    @fatonaoladimeji9697

    4 жыл бұрын

    After the start plot private method type thread.start(); . That solved it for me

  • @kushal7966
    @kushal79663 жыл бұрын

    Hi . Can we do real time data for pie chart

  • @user-ym2lb2vl2n
    @user-ym2lb2vl2n6 жыл бұрын

    not working ...........................i thing you have two different code it make me confuse

  • @alexlooking122

    @alexlooking122

    6 жыл бұрын

    It's different at the end.

  • @mahamhaq9553

    @mahamhaq9553

    6 жыл бұрын

    after data.notifyDataChanged(); you also have to add mChart.notifyDataSetChanged();

  • @kartikaymahajan9591
    @kartikaymahajan95913 жыл бұрын

    hey please tell how to draw real time graph eg. y=sin(t) . the app should ask input from the user for which function the user wants to plot graph. i have been given this project. deadline is 7 days. please help

  • @adarshgupta8093

    @adarshgupta8093

    3 жыл бұрын

    Hello friend did you get any relative content regarding which you mentioned above?

  • @kartikaymahajan9591

    @kartikaymahajan9591

    3 жыл бұрын

    @@adarshgupta8093 no

  • @mashoodkiyani3992
    @mashoodkiyani39926 жыл бұрын

    nice

  • @rynar3952
    @rynar39526 жыл бұрын

    that sudden jump of code really screwed me over. It always crashes on my phone and we have the same phone!

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Rynar please download from GitHub source code. See video description.

  • @lucasbarbosarodrigues3412
    @lucasbarbosarodrigues34126 жыл бұрын

    How do I decrease acceleration?

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    at 08:13 line number 31. You can see there I have registered as SensorDelayNormal. there you can pass value to control Accelerometer sampling rate. Passed value is treated in microseconds. that means if you pass 1000 then sampling would be 1000us = 1ms => 1000 samples per seconds.

  • @nuwnjay
    @nuwnjay6 жыл бұрын

    Where is the DAMN GITHUB LINK!?!?! Please for the sake of God do provide the links!

  • @nuwnjay

    @nuwnjay

    6 жыл бұрын

    A github link would have helped tremendously as the chart does not draw and gives the following issue in the logcat: 12-02 00:58:13.353 1523-1523/nuwanjay.tryev E/SensorManager: sensor or listener is null

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @JuanCarrillo-ey8gg
    @JuanCarrillo-ey8gg6 жыл бұрын

    Can you share the project?

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @Dra60oN
    @Dra60oN6 жыл бұрын

    He used code from this repo: github.com/PhilJay/MPAndroidChart/blob/master/MPChartExample/src/com/xxmassdeveloper/mpchartexample/RealtimeLineChartActivity.java

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @heahaidu6594
    @heahaidu65945 жыл бұрын

  • @KGPTalkie

    @KGPTalkie

    5 жыл бұрын

    Thank you 😍❤️

  • @ababssali2451
    @ababssali24516 жыл бұрын

    sir i have a question

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @vinithanabar277
    @vinithanabar277 Жыл бұрын

    Very poor explanation feels like he is just typing the code and pasting. And in between just trying to explain some common things

  • @cheddargt
    @cheddargt4 жыл бұрын

    25:37 you should absolutely never make jump cuts in your video if you're gonna change or fix something.

  • @KGPTalkie

    @KGPTalkie

    4 жыл бұрын

    Code is live now. Please check. Thanks for watching.

  • @cheddargt

    @cheddargt

    4 жыл бұрын

    @@KGPTalkie Ok, sorry for the saltiness in the comments, I thought you straight up abandoned support.

  • @cheddargt

    @cheddargt

    4 жыл бұрын

    @@KGPTalkie Everything works as it should now. Thanks again for fixing it :)

  • @KGPTalkie

    @KGPTalkie

    4 жыл бұрын

    Thank you for letting me know.

  • @emanresplandor3878
    @emanresplandor38784 жыл бұрын

    FULL WORKING CODE IS NOT WORKING

  • @KGPTalkie

    @KGPTalkie

    4 жыл бұрын

    I will check it tomorrow and correct it.

  • @emanresplandor3878

    @emanresplandor3878

    4 жыл бұрын

    the code in your github is heavily altered and have outdated dependencies, although I already made entirely new working code.

  • @LaxmiKantTiwarilaxmimerit

    @LaxmiKantTiwarilaxmimerit

    4 жыл бұрын

    Kriswella Lyn Matthew That's great to know you have working code. Android keep changing dependencies regularly. Would you please comment below your github code link. I will put in video description with your name. Thanks for sharing.

  • @KGPTalkie

    @KGPTalkie

    4 жыл бұрын

    Thank for letting me know. I have now updated the code and it is working again. Thanks for watching.

  • @ngoannguyen624
    @ngoannguyen6246 жыл бұрын

    hello, u can send code to me? thank you very much!

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

  • @emanresplandor3878

    @emanresplandor3878

    4 жыл бұрын

    @@KGPTalkie code doesnt work bro

  • @KGPTalkie

    @KGPTalkie

    4 жыл бұрын

    I will check it tomorrow and post updated code.

  • @darpanvats57
    @darpanvats576 жыл бұрын

    Tiwari Ji ne naam kharab kar dia, Bache link maang maang rhe h GitHub ka dedo yaar

  • @KGPTalkie

    @KGPTalkie

    6 жыл бұрын

    Project code is given in video description. Please download from GitHub. Thanks for watching.

Келесі