Logo Icon Logo
A Crowd-sourced Cookbook on Writing Great Android® Apps
GitHub logo Twitter logo OReilly Book Cover Art

Introduction: Networking

In Chapter: Networked Applications
Author: Ian Darwin ('idarwin')
Published? true
FormatLanguage: WikiFormat


lorem ipsem dolor. This is intended to be representative of the "chapter introductions" that appear at the start of each chapter of an O'Reilly Cookbook and give general guidance and an introduction to the chapter.

Choose Your Protocol Wisely

While Java makes it easy to create network connections on any protocol, experience shows that HTTP (and HTTPS) are the most universal. If you use a custom protocol talking to your own server, there are some users who will not be able to access your server. Bear in mind that in some countries, high-speed data (aka 3G) is either not yet available or is very expensive, whereas GPRS/EDGE is less expensive and more widely available. Most GPRS service providers only allow HTTP/HTTPS connections, often through a WAP proxy. That said, there may be things you need to do that can't be done via HTTP, for example because their protocol demands a different port number (SIP over port 5000, for example). But do try to make HTTP your first choice when you can - you'll include more customers.