O'Reilly logo

Bulletproof Android™: Practical Advice for Building Secure Apps by Godfrey Nolan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

HTTP(S) Connection

API providers use API keys as a simple authentication mechanism so they can charge for their data, whether that’s traffic information, stock market data, or weather information. Figure 4-1 shows a simple app that allows us to call a Weather Underground URL to display the current weather conditions for your area. In the app, you can either send the request via HTTP or HTTPS by clicking the appropriate button.

Image

Figure 4-1 Android client request

If you’re sending the request via HTTP or HTTPS the URL is called as follows, where 2ee858dd063ef50e is the API key:

http(s)://api.wunderground.com/api/2ee858dd063ef50e/conditions/q/MI/Troy.json ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required