File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,25 @@ allprojects {
2525## Methods and how to use them
2626We 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)
3049Handler handler = new Handler();
You can’t perform that action at this time.
0 commit comments