KRISAMBALI.COM |
FETCH DATA FROM A WEBSERVER : URL METHOD IN ANDROID STUDIO. STEP BY STEP PROCEDURE GIVEN BELOW
SOURCE CODE LINK PROVIDED AT THE END |
1. Download Android studio and install it in windows system 2. Open Android studio > New project > Empty Activity > Select language JAV 3. Give a name to the project as you like > Leave all other fields as it is and click finish 4. Now project opens in android studio and shows 2 tabs 1. Main_Activity.java and 2. Activity_Main.xml in the right 5. In the left side many name may display (If not expand android header on left side) and click on any name displays details on right side
6. Download sourcecode by clicking the link below > extract it 7. (Action on extracted sourcecdoe)Open the folder named App > src > main > java > com > krisambali > datafromwebsite and copy both java files 8. (Action on created project) Right click on MainActivity.java on the left side and paste the copied files>Message box displays click OK and then click overwrite 9. (Action on extracted sourcecdoe)Again Open folder App > src > main > res > layout > Copy Activity_main.xml file 10. (Action on created project) Expand res > layout on left side and right click on Activity_main.xml and click paste to paste the copied file>Message box displays click OK then overwrite 11. (Action on created project) Expand manifest on left side and double click to open AndroidManifest.xml Add 2 lines in AndroidManifest.xml 1. (just above Now project is OK 13. (Action on created project) To create apk file click on Build on upper side > Build Bundles/ Apks > and click Build APKs 14. If no error system will create 'app-debug.apk' file and a message will be displayed on right bottom 15. (Action on created project) To find the file click on locate in the displayed message 16. Transfer the apk file to mobile > Install it (If permission required you have to provide permission to install such files |
Download SourcecodeStill you cannot create an app Contact me (Krishnan.A.Ambali, Retired Senior Manager, Kerala Gramin Bank)
Mobile: 8848241877***email:krisambali@gmail.com