Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

download a website as string kotlin

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) {
}

//Manifest
<uses-permission android:name="android.permission.INTERNET/>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #download #website #string #kotlin
ADD COMMENT
Topic
Name
8+9 =