Skip to content

Commit 99e3670

Browse files
Update README.md
1 parent 0700170 commit 99e3670

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,25 @@ allprojects {
2525
## Methods and how to use them
2626
We have Two classes FetchData and PutData. Import the Library to your file first (In android studio paste the code and press alt + enter).
2727
### Read Data From a URL - FetchData.class
28+
You need to use Handler and post a Runnable. Inside the run method add the code for FetchData.
29+
30+
* Creating the object for FetchData.
31+
```
32+
FetchData fetchData = new FetchData("https://projects.vishnusivadas.com/AdvancedHttpURLConnection/readTest.php");
33+
```
34+
* Calling startFetch() returns a boolean value.
35+
```
36+
fetchData.startFetch();
37+
```
38+
* To know when the process is completes use onComplete() which returns a boolean value.
39+
```
40+
fetchData.onComplete();
41+
```
42+
* If the process is complete, use the getResult() to get the result value.
43+
```
44+
fetchData.getResult();
45+
```
46+
* Full implimentation with Handler. You can also add a progress bar at the commended regions.
2847
```
2948
//Start ProgressBar first (Set visibility VISIBLE)
3049
Handler handler = new Handler();

0 commit comments

Comments
 (0)