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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:34:08+00:00 2026-06-08T00:34:08+00:00

Having done some basic tutorials, I started making my first real android app in

  • 0

Having done some basic tutorials, I started making my first real android app in eclipse. I want this app to check if the text in an EditText matches the text on a website (this one: http://www.augustinianum.eu/roosterwijzigingen/14062012.pdf (it contains my school’s schedule changes)). I’ve found out how to make the app check if the text in the EditText matches a string (with the method contains()), so now the only thing I need to do is to download all of the text of that website to a string. But I have no idea how to. Or is there maybe a method which I can check with if a website contains a certain word without downloading the website’s text to a string.

Thank You!

(BTW I’m not English so plz forgive me if I’ve made some language-related mistakes.)

@androider I can’t post my code in the comment box so here it is:

package me.moop.mytwitter;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import android.app.Activity;
import android.app.ProgressDialog;

public class MainActivity extends Activity {

Button mBtnCheck;
EditText mEtxtGroup;
ProgressDialog mProgressDialog;
TwitterUser mTwitterUser;
TextView mTxtv1;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.nicelayout3);

    mBtnCheck = (Button) findViewById(R.id.btnCheck);
    mEtxtGroup = (EditText) findViewById(R.id.etxtGroup);
    mTxtv1 = (TextView) findViewById(R.id.textView1);

}

  public void checkScheduleChange(View view){
    if (view == mBtnCheck){
        String group;
        group = mEtxtGroup.getText().toString();
        if (group.length() > 0){
            mProgressDialog = new ProgressDialog(this);
            mProgressDialog.setMessage("Bezig met checken voor roosterwijzigingen...");
            mProgressDialog.show();
            try 
            {
                URL url = new URL("http://www.augustinianum.eu/roosterwijzigingen/14062012.pdf");
                BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
                String str;
                while ((str = in.readLine()) != null){
                    mProgressDialog.dismiss();
                   if(str.contains(mEtxtGroup.getText().toString())){
                       Toast.makeText(this, "U hebt een roosterwijziging.", Toast.LENGTH_LONG).show();
                   }
                   else{
                       Toast.makeText(this, "U hebt geen roosterwijzigingen", Toast.LENGTH_LONG).show();
                   }
                }
                in.close();
            } catch (MalformedURLException e) {
                Toast.makeText(this, "Er is een fout opgetreden, probeer opniew.", Toast.LENGTH_LONG).show();
            } catch (IOException e) {
                Toast.makeText(this, "Er is een fout opgetreden, probeer opniew.", Toast.LENGTH_LONG).show();
            }
        }
        else{
            Toast.makeText(this, "Voer een klas in", Toast.LENGTH_LONG).show();
        }
    }
  }
}         

Here are the button’s properties:

 <Button
        android:id="@+id/btnCheck"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:clickable="true"
        android:onClick="checkScheduleChange"
        android:text="Check" >
  • 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-06-08T00:34:09+00:00Added an answer on June 8, 2026 at 12:34 am

    You can get the text using InputStream Reader like this.

    try 
    {
        URL url = new URL("http://yourwebpage.com");
        // Read all the text returned by the server
        BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
        String str;
        while ((str = in.readLine()) != null) 
        {
         // str is one line of text; readLine() strips the newline character(s)
         // You can use the contain method here.
           if(str.contains(editText.getText().toString))
            {
              You can perform your logic here!!!!!         
            }
        }
        in.close();
    } catch (MalformedURLException e) {
    } catch (IOException e) {
    }
    

    Also add an additional permission in your apps Manifest file:

    <uses-permission android:name="android.permission.INTERNET/>   
    

    //============================EDIT================================//

    if (group.length() > 0)
      {
                mProgressDialog = new ProgressDialog(this);
                mProgressDialog.setMessage("Bezig met checken voor roosterwijzigingen...");
                mProgressDialog.show();
                try 
                {
                    URL url = new URL("http://www.augustinianum.eu/roosterwijzigingen/14062012.pdf");
                    BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
                    String str;
                    while ((str = in.readLine()) != null){
    
                       if(str.contains(mEtxtGroup.getText().toString())){
    
                         if(mProgressDialog.isShowing())
                         { 
                            mProgressDialog.dismiss(); 
                         }
    
    
                         Toast.makeText(this, "U hebt een roosterwijziging.", Toast.LENGTH_LONG).show();
                         break;
                       }
                    }
                    in.close();
                } catch (MalformedURLException e) {
                    Toast.makeText(this, "Er is een fout opgetreden, probeer opniew.", Toast.LENGTH_LONG).show();
                } catch (IOException e) {
                    Toast.makeText(this, "Er is een fout opgetreden, probeer opniew.", Toast.LENGTH_LONG).show();
                }
    
                         if(mProgressDialog.isShowing())
                         { 
                            mProgressDialog.dismiss(); 
                         }
            }
            else{
                Toast.makeText(this, "Voer een klas in", Toast.LENGTH_LONG).show();
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having done some basic tutorials, I started making my first real android app in
Im having problem in my UIscrollView ,this is what I have done: Whenever a
Simple question. Just wondering if this can be done without me having to enforce
Having worked through some tutorials on some basics via the iPhone, I'm struggling to
it's my first post here :) I'm having some difficulties with dealing with urls
If this can only be done in some browsers, I'd still like to know
i've started on some basic java coding with gwt, and im getting a bit
Ok I am still having some issues with this code below. I have received
I know it can be done but am having issues getting it to work.
having some issues with a networking assignment. End goal is to have a C

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.