Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5839849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:38:59+00:00 2026-05-22T11:38:59+00:00

I want to make an app which shows cardio graph in real time. That

  • 0

I want to make an app which shows cardio graph in real time. That means i want to measure heart bit and want to show the bit rate in graph in my application. But i wondering to draw the cardio graph. I have gone through many sample graph codes but dint get any clue to draw cardio graph. Is there any clue from any body?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T11:38:59+00:00Added an answer on May 22, 2026 at 11:38 am

    For this specific application, you may want to draw the graph “by hand” using Path and a SurfaceView.

    Get a Paint instance ready during initialization:

    Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
    paint.setStyle(Paint.Style.STROKE);
    paint.setStrokeWidth(3);
    paint.setColor(Color.GREEN);  //Change to what you want
    

    When you need to update the graphic, clear the scene and build the line path (adapt this to your needs) :

    canvas.drawColor(Color.WHITE);
    
    Path path = new Path();
    path.moveTo(0, yourValueAt(0));
    for(int sec = 1; sec < 30; sec++)
        path.lineTo(sec, yourValueAt(sec));
    
    canvas.drawPath(path, paint);
    

    You may also use quadTo or cubicTo instead of lineTo.

    If you want your graph to have a realtime animation effect (i.e. sliding to the left while data is coming on the right), you may draw on a SurfaceView in a similar way to the famous LunarLander example (following code is a simplified version):

    class DrawingThread extends Thread {
        @Override
        public void run() {
            while (running) {
                Canvas c = null;
                try {
                    c = mSurfaceHolder.lockCanvas(null);
                    synchronized (mSurfaceHolder) {
                        doDraw(c);
                    }
                } finally {
                    if (c != null) mSurfaceHolder.unlockCanvasAndPost(c);
                }
                synchronized (this) {
                    //Optional but saves battery life.
                    //You may compute the value to match a given max framerate..
                    this.wait(SOME_DELAY_IN_MS); 
                }
            }
        }
    }
    

    Where mSurfaceHolder is obtained by calling yourSurfaceView.getHolder() and doDraw is where
    you call canvas.drawPath() and all your drawing code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make an iPhone app that shows many greeting cards, I like
I want to make an app which will show a feedback form at the
i want to make an app which can add the file properties of a
I want to make an app that has a view that moves randomly or
I want to make an app that can receive broadcast when other apps on
i want to make a php app that let people submit photos/videos/sounds Now, everything
I am designing a prank app for android in which i want to show
i want to build an app in which users can make foto which is
I am new android app developer i want make app for tablets and phone
I want to make an App Engine connected Android app, and I'm beginning with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.