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 7594741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:29:46+00:00 2026-05-30T21:29:46+00:00

I have an asynctask that reads data from a device and then I want

  • 0

I have an asynctask that reads data from a device and then I want to show this data in a TextView. I have a ScrollView in my application, and have a TextView inside it, textview is manually scrolling but I need to update the position of the last line on update progress, here is my Asynctask code

private class ReadDataTask extends AsyncTask<Void, String, String>{

        /* (non-Javadoc)
     * @see android.os.AsyncTask#onProgressUpdate(Progress[])
     */
    @Override
    protected void onProgressUpdate(String... values) {
        String frm=values[0];
        Log.d("bluetoothdata", frm);
        if(logtextview.getText().length()>(1024*1024)){
            logtextview.setText(frm);
        }else{
            logtextview.append(frm);
        }

    //  Toast.makeText(SetBluetoothActivity.this, "frame updated", Toast.LENGTH_SHORT).show();
    }

        @Override
        protected String doInBackground(Void... params) {

            while(connected){
                String frame=readFrame();
                publishProgress(frame);
            }
            return null;
        }

    }

What I need is to position my textview as its last line will always appear. Any help will be appreciated

  • 1 1 Answer
  • 0 Views
  • 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-30T21:29:47+00:00Added an answer on May 30, 2026 at 9:29 pm

    Have you tried the solutions listed here?

    auto-scrolling TextView in android to bring text into view

    Android: auto scrolling down the EditTextView for chat apps

    how to implement Scroller in textview for auto scrolling?

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

Sidebar

Related Questions

I have an AsyncTask, that fills a custom List with parsed data from Internet.
I have an AsyncTask and on the background I want to start Service that
I have a class that extends AsyncTask , which fetches the gps cordinates from
I have an asynctask that parses an xml file from the net. I'm storing
I have a Service downloading data every second from a web server (This Service
I have an AsyncTask that get info from the web. Sometimes the connection fails
I have developed an application that does require to do constant network activity. This
I want to grab some data from remote database and I have some networking
So I have a web application that serves some data...lets say if I query
I'm making an application that get data from webservice , insert it into a

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.