SlideShare a Scribd company logo
You can download this document from www.besthinditutorials.com
Android Networking
 Introduction to android networking in Hindi
 Networks status in android in Hindi
 HTTP request handling with android networking in Hindi
 Example
Introduction to android networking
Mobile phones computer Android phones networking
computer emails, web surfing
औ watching online videos services android networking
provide user web services provide
application networking implement
Android networking 3 implement
 IP (Internet Protocol)
 WiFi
 Bluetooth
Android java.net औ org.apache.http-client packages provide इ
packages application basic networking implement
detail networking implement android.net
package उ applications web
based
Network status
device network connected check
ConnectivityManager class इ
ConnectivityManager class object create इ current object
getSystemService() method call इ method
You can download this document from www.besthinditutorials.com
CONNECTIVITY_SERVICE context pass method object return
convert ConnectivityManager class object assign
इ इ object isConnected() method call
device network connected method true औ
false return
ConnectivityManager obj;
obj = (ConnectivityManager) this.getSystemService(context.CONNECTIVITY_SERVICE);
if(obj.isConnected())
{
Toast t1 = new Toast();
t1.makeText(context, "you are connected to internet",Toast.LENGTH_SHORT);
t1.show();
}
else
{
Toast t2 = new Toast();
t2.makeText(context, "you are not connected to internet",Toast.LENGTH_SHORT);
t2.show();
}
Handling HTTP requests
device network connected
operations perform Server HTTP requests औ HTTP
response basic networking operation URL open
request operations perform
HTTP operations perform android URL औ
httpURLConnection classes provide URL class object
इ object valid URL pass इ इ
object openConnection() method call इ result
httpURLConnection class reference variable assign इ
You can download this document from www.besthinditutorials.com
httpURLConnection class उ object connect() method call
इ httpURLConnection class object getInputStream() method call
औ इ InputStreamReader class object pass औ
InputStreamReader class object BufferReader class object pass
इ BufferReader class object readLine() method call
data read loop इ
BufferReader class object close() method call input stream close
औ httpURLConnection class object disconnect() method call
connection disconnect result return
इ उ
Activity class getHttpResponse() method
String result;
URL myurl = new URL("http://www.google.com");
httpURLConnection obj = (httpURLConnection) myurl.openConnection();
obj.connect();
InputStreamReader isr = new InputStreamReader(obj.getInputStream);
BufferReader br = new BufferReader(isr);
String input;
int count=0;
while(input = (br.readLine() != null)) // reading data
{
result = input;
count++;
}
br.close();
obj.disconnect();
return result;
You can download this document from www.besthinditutorials.com
Read more tutorials on Android in Hindi at www.besthinditutorials.com

More Related Content

What's hot (12)

PDF
Deploy with Confidence using Pact Go!
DiUS
 
PPT
2310 b 11
Krazy Koder
 
ODP
Turmeric SOA - Security and Policy
kingargyle
 
PDF
07 objective-c session 7
Amr Elghadban (AmrAngry)
 
DOCX
Assistive Technology_Research
Meng Kry
 
PDF
第一次用Parse就深入淺出
Ymow Wu
 
PPTX
Servlet session 7
Anuj Singh Rajput
 
PPTX
mediator
guest55ff01
 
PPTX
Academy PRO: ASP .NET Core MVC
Binary Studio
 
PPT
2310 b 08
Krazy Koder
 
PPT
Data management with ado
Dinesh kumar
 
PPTX
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 
Deploy with Confidence using Pact Go!
DiUS
 
2310 b 11
Krazy Koder
 
Turmeric SOA - Security and Policy
kingargyle
 
07 objective-c session 7
Amr Elghadban (AmrAngry)
 
Assistive Technology_Research
Meng Kry
 
第一次用Parse就深入淺出
Ymow Wu
 
Servlet session 7
Anuj Singh Rajput
 
mediator
guest55ff01
 
Academy PRO: ASP .NET Core MVC
Binary Studio
 
2310 b 08
Krazy Koder
 
Data management with ado
Dinesh kumar
 
Sharepoint Saturday India Online best practice for developing share point sol...
Shakir Majeed Khan
 

Viewers also liked (7)

PDF
Learn java in hindi
Vipin sharma
 
DOC
Resume1
pasalasuneelkumar
 
PPT
android layouts
Deepa Rani
 
PDF
Input and Output Control
Techronology Inc.
 
PDF
Android ui layout
Krazy Koder
 
PPT
Android Ui
Jetti Chowdary
 
PDF
Layouts in android
Durai S
 
Learn java in hindi
Vipin sharma
 
android layouts
Deepa Rani
 
Input and Output Control
Techronology Inc.
 
Android ui layout
Krazy Koder
 
Android Ui
Jetti Chowdary
 
Layouts in android
Durai S
 
Ad

Similar to Android networking in Hindi (7)

PDF
Android Performance #4: Network
Yonatan Levin
 
PPTX
Performance #4 network
Vitali Pekelis
 
PDF
Android Networking
Matteo Bonifazi
 
PPTX
Communication in android
eleksdev
 
PDF
Android App Development 06 : Network & Web Services
Anuchit Chalothorn
 
PDF
Android http library
Francesco Azzola
 
PDF
Importance of Standardization of APIs and its Usage
⚡️ Vikram Sahu
 
Android Performance #4: Network
Yonatan Levin
 
Performance #4 network
Vitali Pekelis
 
Android Networking
Matteo Bonifazi
 
Communication in android
eleksdev
 
Android App Development 06 : Network & Web Services
Anuchit Chalothorn
 
Android http library
Francesco Azzola
 
Importance of Standardization of APIs and its Usage
⚡️ Vikram Sahu
 
Ad

Recently uploaded (20)

PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PPTX
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PPTX
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
MRRS Strength and Durability of Concrete
CivilMythili
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
原版一样(Acadia毕业证书)加拿大阿卡迪亚大学毕业证办理方法
Taqyea
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Set Relation Function Practice session 24.05.2025.pdf
DrStephenStrange4
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Snet+Pro+Service+Software_SNET+Pro+2+Instructions.pptx
jenilsatikuvar1
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
Day2 B2 Best.pptx
helenjenefa1
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Hashing Introduction , hash functions and techniques
sailajam21
 

Android networking in Hindi

  • 1. You can download this document from www.besthinditutorials.com Android Networking  Introduction to android networking in Hindi  Networks status in android in Hindi  HTTP request handling with android networking in Hindi  Example Introduction to android networking Mobile phones computer Android phones networking computer emails, web surfing औ watching online videos services android networking provide user web services provide application networking implement Android networking 3 implement  IP (Internet Protocol)  WiFi  Bluetooth Android java.net औ org.apache.http-client packages provide इ packages application basic networking implement detail networking implement android.net package उ applications web based Network status device network connected check ConnectivityManager class इ ConnectivityManager class object create इ current object getSystemService() method call इ method
  • 2. You can download this document from www.besthinditutorials.com CONNECTIVITY_SERVICE context pass method object return convert ConnectivityManager class object assign इ इ object isConnected() method call device network connected method true औ false return ConnectivityManager obj; obj = (ConnectivityManager) this.getSystemService(context.CONNECTIVITY_SERVICE); if(obj.isConnected()) { Toast t1 = new Toast(); t1.makeText(context, "you are connected to internet",Toast.LENGTH_SHORT); t1.show(); } else { Toast t2 = new Toast(); t2.makeText(context, "you are not connected to internet",Toast.LENGTH_SHORT); t2.show(); } Handling HTTP requests device network connected operations perform Server HTTP requests औ HTTP response basic networking operation URL open request operations perform HTTP operations perform android URL औ httpURLConnection classes provide URL class object इ object valid URL pass इ इ object openConnection() method call इ result httpURLConnection class reference variable assign इ
  • 3. You can download this document from www.besthinditutorials.com httpURLConnection class उ object connect() method call इ httpURLConnection class object getInputStream() method call औ इ InputStreamReader class object pass औ InputStreamReader class object BufferReader class object pass इ BufferReader class object readLine() method call data read loop इ BufferReader class object close() method call input stream close औ httpURLConnection class object disconnect() method call connection disconnect result return इ उ Activity class getHttpResponse() method String result; URL myurl = new URL("http://www.google.com"); httpURLConnection obj = (httpURLConnection) myurl.openConnection(); obj.connect(); InputStreamReader isr = new InputStreamReader(obj.getInputStream); BufferReader br = new BufferReader(isr); String input; int count=0; while(input = (br.readLine() != null)) // reading data { result = input; count++; } br.close(); obj.disconnect(); return result;
  • 4. You can download this document from www.besthinditutorials.com Read more tutorials on Android in Hindi at www.besthinditutorials.com