Location services - WeatherApp

Description

WeatherApp is a simple weather application showing a four-day forecast with temperatures, relative humidity, wind speed, and wind direction. The application retrieves the current location via cell ID or GPS or a user-defined location and uses it to retrieve the weather forecast. World Weather Online APIs are used for both weather data and location search data. The application uses the org.json.me library for parsing JSON.

The application has been designed to work especially on Nokia Asha software platform and on various Series 40 phones with different form factors and input methods, but it also scales to the Symbian touch UI display. The updated version has been optimised for Nokia Asha platform and Series 40 full touch phones.

WeatherApp introduces in-app advertising in form of banners and full-screen ads. In-app advertising generates better revenue for your application. All the ads are provided by Inneractive.

Figure: WeatherApp MIDlet running on a Nokia Asha software platform device

For a tutorial that shows you how to create this MIDlet, see section Example: Creating a weather forecast MIDlet.

Compatibility

  • Compatible with Nokia Asha software platform 1.0 and Series 40 phones.

    Note:

    The phone needs to support the maximum Java heap size and a JAR file size of at least 1 MB. Network connectivity is also required.

  • Tested on Nokia Asha 501, Nokia Asha 311, Nokia Asha 306, Nokia Asha 303, Nokia Asha 302, Nokia Asha 200 and Nokia X3-02.

  • Developed with Nokia Asha SDK 1.0.

Prerequisites

You need the following to develop and test this MIDlet:

  • Nokia Asha SDK 1.0

  • Nokia Asha software platform 1.0 or Series 40 phone with CLDC 1.1, MIDP 2.1 APIs

  • World Weather Online API key

  • Inneractive API key for in-app advertising plugin

Important:

You need to acquire your own API keys for using the World Weather Online API (http://www.worldweatheronline.com) and Inneractive API (http://www.inner-active.com). Replace the placeholder keys in com.nokia.example.weatherapp.network.Keys class with the acquired keys. Otherwise, the MIDlet throws a NullPointerException when it is closed.

MIDlet project

The MIDlet project files are packaged as a zip file. To download the zip file, click the following link:

Download WeatherApp

Table: MIDlet details

MIDlet version

1.5

Creation date

1 August 2013

IDE

Nokia IDE for Java ME (Eclipse) and NetBeans

SDK

Nokia Asha SDK 1.0

For possible newer version, other updates or additional documentation, check the WeatherApp at Nokia Developer Projects.