diff --git a/GooglME-2.iws b/GooglME-2.iws index b137339..97e7baf 100755 --- a/GooglME-2.iws +++ b/GooglME-2.iws @@ -115,42 +115,42 @@ - + - + - + - + - + - + - + @@ -159,7 +159,7 @@ - + @@ -173,14 +173,14 @@ - + - + @@ -201,30 +201,30 @@ - - - + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -258,6 +258,20 @@ + + - - @@ -357,13 +357,13 @@ - + - + @@ -460,51 +460,30 @@ - - - - - - - - - - - - - - - - - - - - - - + - + - + - + @@ -513,7 +492,7 @@ - + @@ -527,14 +506,35 @@ - + - + + + + + + + + + + + + + + + + + + + + + + diff --git a/GooglME-2.jad b/GooglME-2.jad index b2bd49f..2c045e8 100755 --- a/GooglME-2.jad +++ b/GooglME-2.jad @@ -1,7 +1,7 @@ MIDlet-1: GooglME,/googlme.png,net.thauvin.j2me.googlme.GooglME MIDlet-Jar-URL: GooglME-2.jar MIDlet-Icon: /googlme.png -MIDlet-Version: 0.3.0 +MIDlet-Version: 0.4.0 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/GooglME.jad b/GooglME.jad index 1fd2405..add4690 100755 --- a/GooglME.jad +++ b/GooglME.jad @@ -1,7 +1,7 @@ MIDlet-1: GooglME,/googlme.png,net.thauvin.j2me.googlme.GooglME MIDlet-Jar-URL: GooglME.jar MIDlet-Icon: /googlme.png -MIDlet-Version: 0.3.0 +MIDlet-Version: 0.4.0 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/build.xml b/build.xml index 6c5044f..d161a10 100755 --- a/build.xml +++ b/build.xml @@ -86,7 +86,7 @@ - + diff --git a/googlme.wml b/googlme.wml index e4b3447..f6d278d 100755 --- a/googlme.wml +++ b/googlme.wml @@ -8,7 +8,7 @@

- GoogleME 0.3 (13Kb)
+ GoogleME 0.4 (~13Kb)

MIDP 2.0
diff --git a/src/net/thauvin/j2me/googlme/GooglME.java b/src/net/thauvin/j2me/googlme/GooglME.java index 7d7358b..e55dba9 100755 --- a/src/net/thauvin/j2me/googlme/GooglME.java +++ b/src/net/thauvin/j2me/googlme/GooglME.java @@ -83,6 +83,11 @@ public class GooglME extends MIDlet implements CommandListener, Runnable */ protected static final String CHOICE_GOOGLE_SMS = "Google SMS"; + /** + * Google Weather choice. + */ + protected static final String CHOICE_WEATHER = "Weather"; + /** * Local Showtimes choice. */ @@ -107,7 +112,7 @@ public class GooglME extends MIDlet implements CommandListener, Runnable /** * The application version. */ - protected static final String APP_VERSION = "0.3"; + protected static final String APP_VERSION = "0.4"; /** * The Back command. @@ -121,7 +126,7 @@ public class GooglME extends MIDlet implements CommandListener, Runnable { CHOICE_GOOGLE_SMS, CHOICE_GOOGLE_LOCAL, CHOICE_FROOGLE_PRICES, CHOICE_GOOGLE_SEARCH, CHOICE_MOVIE_SHOWTIMES, CHOICE_LOCAL_SHOWTIMES, - CHOICE_DEFINITION + CHOICE_DEFINITION, CHOICE_WEATHER }; /** @@ -184,6 +189,11 @@ public class GooglME extends MIDlet implements CommandListener, Runnable */ private static final String PREFIX_MOVIE = "movie: "; + /** + * The Weather query prefix. + */ + private static final String PREFIX_WEATHER = "weather "; + /** * The history preferences key. */ @@ -406,6 +416,13 @@ public class GooglME extends MIDlet implements CommandListener, Runnable } } + // Weather + else if (query.startsWith(PREFIX_WEATHER)) + { + _mainScreen.queryFld.setString(query.substring(PREFIX_WEATHER.length())); + _mainScreen.actionPopup.setSelectedIndex(choiceIndex(CHOICE_WEATHER), true); + } + // Local else if (isValidString(_location) && query.endsWith('.' + _location)) { @@ -708,6 +725,12 @@ public class GooglME extends MIDlet implements CommandListener, Runnable } } + // Weather + else if (_action.equals(CHOICE_WEATHER)) + { + text = PREFIX_WEATHER + _query; + } + // Default else { diff --git a/src/net/thauvin/j2me/googlme/HelpScreen.java b/src/net/thauvin/j2me/googlme/HelpScreen.java index 1616154..7175d15 100755 --- a/src/net/thauvin/j2me/googlme/HelpScreen.java +++ b/src/net/thauvin/j2me/googlme/HelpScreen.java @@ -71,6 +71,8 @@ public class HelpScreen extends Form append(new StringItem(GooglME.CHOICE_LOCAL_SHOWTIMES + ": ", "To get local movie showtimes, enter the movie's title. For a listing of theaters near you, enter 'theaters'. For a listing of movies playing near you, enter 'movies'. The permanent location setting is automatically added to your query.\n\n")); append(new StringItem(GooglME.CHOICE_DEFINITION + ": ", "For definitions, enter the word or term.\n\n")); + append(new StringItem(GooglME.CHOICE_WEATHER + ": ", + "To get the latest weather conditions and four-day forecast for a particular U.S. location, just enter your location, zip or city and state.\n\n")); addCommand(GooglME.COMMAND_BACK);