diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 08de716..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/CVS/ -CVS -/deployed/ -/build/ -/cmd.bat \ No newline at end of file diff --git a/GooglME-1.iws b/GooglME-1.iws index 7dc7bfa..0f8934c 100755 --- a/GooglME-1.iws +++ b/GooglME-1.iws @@ -115,7 +115,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -133,28 +133,28 @@ - + - + - + - + @@ -163,7 +163,7 @@ - + @@ -179,25 +179,25 @@ - + - - - - + + + + @@ -231,6 +231,30 @@ + + + + + + + - - - - - - - @@ -330,21 +330,21 @@ - + - - - + + + - - - + + + - + @@ -444,16 +444,9 @@ - - - - - - - - + @@ -462,7 +455,7 @@ - + @@ -471,28 +464,28 @@ - + - + - + - + @@ -501,7 +494,7 @@ - + diff --git a/GooglME-2.iws b/GooglME-2.iws index eac11b6..b137339 100755 --- a/GooglME-2.iws +++ b/GooglME-2.iws @@ -112,45 +112,45 @@ - + - + - + - + - + - + - + - + @@ -159,7 +159,7 @@ - + @@ -173,14 +173,14 @@ - + - + @@ -202,29 +202,29 @@ + - - - - - - - - - - - - - + + + + + + + + + - - + + + + + @@ -258,20 +258,6 @@ - - + + @@ -357,13 +357,13 @@ - + - + @@ -460,13 +460,6 @@ - - - - - - - @@ -474,30 +467,44 @@ + + + + + + + - + + + + + + + + - + - + - + @@ -506,7 +513,7 @@ - + @@ -520,21 +527,14 @@ - + - - - - - - - - + diff --git a/GooglME-2.jad b/GooglME-2.jad index 968d158..b2bd49f 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.4.2 +MIDlet-Version: 0.3.0 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/GooglME.jad b/GooglME.jad index cf7964e..1fd2405 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.4.2 +MIDlet-Version: 0.3.0 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/build.xml b/build.xml index d161a10..6c5044f 100755 --- a/build.xml +++ b/build.xml @@ -86,7 +86,7 @@ - + diff --git a/googlme.gif b/googlme.gif index 3f1852a..3f42cfd 100755 Binary files a/googlme.gif and b/googlme.gif differ diff --git a/googlme.wml b/googlme.wml index 837758b..e4b3447 100755 --- a/googlme.wml +++ b/googlme.wml @@ -8,7 +8,7 @@

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

MIDP 2.0
diff --git a/lib/cldcapi10.jar b/lib/cldcapi10.jar index d53b92b..9b4bf49 100755 Binary files a/lib/cldcapi10.jar and b/lib/cldcapi10.jar differ diff --git a/lib/midpapi10.jar b/lib/midpapi10.jar index 58514a9..f7a0634 100755 Binary files a/lib/midpapi10.jar and b/lib/midpapi10.jar differ diff --git a/lib/midpapi20.jar b/lib/midpapi20.jar index 46d9dc0..9969041 100755 Binary files a/lib/midpapi20.jar and b/lib/midpapi20.jar differ diff --git a/res/.gitignore b/res/.gitignore deleted file mode 100644 index 0acd18c..0000000 --- a/res/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Thumbs.db diff --git a/src/net/thauvin/j2me/googlme/.gitignore b/src/net/thauvin/j2me/googlme/.gitignore deleted file mode 100644 index a0fa60b..0000000 --- a/src/net/thauvin/j2me/googlme/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/desktop.ini diff --git a/src/net/thauvin/j2me/googlme/GooglME.java b/src/net/thauvin/j2me/googlme/GooglME.java index 7d90976..7d7358b 100755 --- a/src/net/thauvin/j2me/googlme/GooglME.java +++ b/src/net/thauvin/j2me/googlme/GooglME.java @@ -83,11 +83,6 @@ 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. */ @@ -112,7 +107,7 @@ public class GooglME extends MIDlet implements CommandListener, Runnable /** * The application version. */ - protected static final String APP_VERSION = "0.4.2"; + protected static final String APP_VERSION = "0.3"; /** * The Back command. @@ -126,7 +121,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_WEATHER + CHOICE_DEFINITION }; /** @@ -189,11 +184,6 @@ 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. */ @@ -288,10 +278,10 @@ public class GooglME extends MIDlet implements CommandListener, Runnable { if (isValidString(_address)) { - /* final */ String q = _mainScreen.queryFld.getString(); + _query = _mainScreen.queryFld.getString(); _action = CHOICES[_mainScreen.actionPopup.getSelectedIndex()]; - if (isValidString(q)) + if (isValidString(_query)) { if (((_action.equals(CHOICE_GOOGLE_LOCAL)) || (_action.equals(CHOICE_LOCAL_SHOWTIMES))) && !isValidString(_location)) @@ -305,11 +295,6 @@ public class GooglME extends MIDlet implements CommandListener, Runnable _sendingAlert = new Alert(""); } - _query = buildQuery(q); - - addHistory(_query); - saveHistory(); - alert(_sendingAlert, "Sending SMS", "Sending message to " + _address + "...", d, 2500, false); new Thread(this).start(); @@ -421,13 +406,6 @@ 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)) { @@ -578,8 +556,10 @@ public class GooglME extends MIDlet implements CommandListener, Runnable { _history.removeElementAt(MAX_HISTORY - 1); } - + _history.insertElementAt(query, 0); + + saveHistory(); } // Displays a modal message/error alert dialog. @@ -609,75 +589,6 @@ public class GooglME extends MIDlet implements CommandListener, Runnable _display.setCurrent(alert, d); } - // Builds the full query . - private String buildQuery(String query) - { - /* final */ String text; - - if (_action.equals(CHOICE_GOOGLE_LOCAL)) - { - if (isValidString(_location)) - { - text = query + '.' + _location; - } - else - { - text = query; - } - } - - // Froogle - else if (_action.equals(CHOICE_FROOGLE_PRICES)) - { - text = PREFIX_FROOGLE + query; - } - - // Google - else if (_action.equals(CHOICE_GOOGLE_SEARCH)) - { - text = PREFIX_GOOGLE + query; - } - - // Definition - else if (_action.equals(CHOICE_DEFINITION)) - { - text = PREFIX_DEFINITION + query; - } - - // Showtimes - else if (_action.equals(CHOICE_MOVIE_SHOWTIMES)) - { - text = PREFIX_MOVIE + query; - } - - // Local Showtimes - else if (_action.equals(CHOICE_LOCAL_SHOWTIMES)) - { - if (isValidString(_location)) - { - text = PREFIX_MOVIE + query + ' ' + _location; - } - else - { - text = PREFIX_MOVIE + query; - } - } - - // Weather - else if (_action.equals(CHOICE_WEATHER)) - { - text = PREFIX_WEATHER + query; - } - - // Default - else - { - text = query; - } - - return text; - } - // Exits the application. private void exit() { @@ -746,9 +657,66 @@ public class GooglME extends MIDlet implements CommandListener, Runnable /* final */ TextMessage msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE); msg.setAddress(address); - msg.setPayloadText(_query); + /* final */ String text; + if (_action.equals(CHOICE_GOOGLE_LOCAL)) + { + if (isValidString(_location)) + { + text = _query + '.' + _location; + } + else + { + text = _query; + } + } + + // Froogle + else if (_action.equals(CHOICE_FROOGLE_PRICES)) + { + text = PREFIX_FROOGLE + _query; + } + + // Google + else if (_action.equals(CHOICE_GOOGLE_SEARCH)) + { + text = PREFIX_GOOGLE + _query; + } + + // Definition + else if (_action.equals(CHOICE_DEFINITION)) + { + text = PREFIX_DEFINITION + _query; + } + + // Showtimes + else if (_action.equals(CHOICE_MOVIE_SHOWTIMES)) + { + text = PREFIX_MOVIE + _query; + } + + // Local Showtimes + else if (_action.equals(CHOICE_LOCAL_SHOWTIMES)) + { + if (isValidString(_location)) + { + text = PREFIX_MOVIE + _query + ' ' + _location; + } + else + { + text = PREFIX_MOVIE + _query; + } + } + + // Default + else + { + text = _query; + } + + msg.setPayloadText(text); conn.send(msg); + addHistory(text); //alert("SMS Sent", "The text message was sent.", _mainScreen, false); } diff --git a/src/net/thauvin/j2me/googlme/HelpScreen.java b/src/net/thauvin/j2me/googlme/HelpScreen.java index 7175d15..1616154 100755 --- a/src/net/thauvin/j2me/googlme/HelpScreen.java +++ b/src/net/thauvin/j2me/googlme/HelpScreen.java @@ -71,8 +71,6 @@ 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);