Accessing Network Services

Appportunity

Build your own Android App Dev Empire

Get Instant Access

The Android platform has a wide variety of networking libraries. Those accustomed to Java networking will find the java.net package familiar. There are also some helpful Android utility classes for various types of network operations and protocols. Developers can secure network communication by using common technologies such as SSL and HTTPS.

To access a network, an Android application must have the appropriate permissions granted within the Android manifest file. Network tasks are blocking operations, and mobile networks can be very slow, so it is imperative that all network operations be handled asynchronously.

Network operations can take some time. Therefore, all network-related calls should be handled asynchronously, separately from the main UI thread. This can be accomplished by using the Java Thread class or by using the Android AsyncTask class, which is discussed later in this hour.

Was this article helpful?

0 0

Post a comment