Commit graph

4448 commits

Author SHA1 Message Date
Andy2
1529319a60 add vibrate permission; get RelayReceiver notified on boot so can set
initial timer.
2011-02-23 07:39:14 -08:00
Eric House
83cb8550dc set the right field for sounds and notifications (helps to RTFM, but still not tested on device) 2011-02-23 06:00:27 -08:00
Eric House
29b05b83ec Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-02-22 19:56:40 -08:00
Eric House
ab71ac8847 add game name to chat activity title 2011-02-22 19:55:57 -08:00
Andy2
aaffb749cd move network prefs into its own category; add prefs checkboxes there
and getters controlling whether vibrate and sound are used as part of
notifications.
2011-02-22 18:59:56 -08:00
Andy2
151df44c96 get rid of m_invalPath. It seems to be the onContentChanged() on
focus grabs that was needed.
2011-02-22 18:30:37 -08:00
Andy2
dbb69bfff5 add in flags to get vibration and sound with notifications. (Untested
on device.)  Will want to add prefs to disable these.
2011-02-22 18:29:53 -08:00
Andy2
bf567a131a fix crash (according to stack crawl from device) 2011-02-22 18:09:20 -08:00
Andy2
697fc7d5ca get rid of some logging 2011-02-22 06:54:03 -08:00
Andy2
030d2e76a7 add interface with method that's called whenever a DB record is saved.
GamesList implements that interface and invalidates the list item
corresponding so it'll get redrawn with updated info.  Should allow to
replace m_invalPath but doesn't...
2011-02-22 06:48:20 -08:00
Andy2
f75318e9d0 rename method and add variant then remove duplicated code. No behavior change. 2011-02-21 19:47:00 -08:00
Andy2
a4e995742f bring back RelayService, which RelayReceiver now delegates to for the
work of pinging relay on timer.  That work, which can cause receiver
to exceed its timeout if there are e.g. problems resolving hostnames,
must be done in a thread and Receivers aren't supposed to have
threads.  Seems to work as well as it did before and also fixes
force-restart bugs when the network is slow/unavailable.
2011-02-21 18:12:15 -08:00
Andy2
318b820ea7 tweak newbie info for chat 2011-02-21 18:09:12 -08:00
Andy2
07fd2f6bb8 add title to chat activity 2011-02-21 06:51:47 -08:00
Andy2
21d46957be comment out some logging and the annoying toast-on-relay-check 2011-02-21 06:50:54 -08:00
Andy2
353832a7ca Look at opening game immediately when relaunched via onNewIntent() as
well as via onCreate().
2011-02-19 21:20:56 -08:00
Andy2
5ede3b19f0 up constants for beta 22 2011-02-19 08:41:14 -08:00
Andy2
2150d8b4a4 be a bit less pessimistic 2011-02-18 22:53:13 -08:00
Eric House
5d25faa780 update changes log 2011-02-18 22:51:09 -08:00
Eric House
1e3f094289 up constants for b21 2011-02-18 22:50:37 -08:00
Andy2
3fb7c48172 turn off tile selection for linux (perhaps temporarily) 2011-02-18 22:31:28 -08:00
Andy2
15f40f01af fix to compile with new gdk that's on ubuntu 10.10. Need to fix the
APIs eventually.....
2011-02-18 22:28:32 -08:00
Andy2
5460941ba8 cleanup 2011-02-18 22:23:06 -08:00
Andy2
9fbce6f942 remove old comment that wasn't supposed to get checked in. 2011-02-18 22:18:28 -08:00
Eric House
8fe195e91c Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch 2011-02-18 22:15:03 -08:00
Eric House
020c2b6982 fix warnings by removing unused strings 2011-02-18 22:13:24 -08:00
Andy2
27bc89b684 when launched after chat messages have been received, launch the chat
activity.  This requires an enum be stored in the DB instead of a
boolean.
2011-02-18 18:45:26 -08:00
Andy2
31348d978e mark game as synced -- having messages -- if the only messages to
arrive had to do with chat.  Clear that flag when opening game, not
when saving it.
2011-02-18 18:06:27 -08:00
Andy2
94a7361e99 Add spaces to sql commands adding columns -- they'll fail otherwise. 2011-02-18 18:02:52 -08:00
Andy2
0726cefb10 fix NPE: if there's no history string don't try to split it. 2011-02-18 17:44:23 -08:00
Andy2
d2fda267e5 fix assertion failure that happened when I changed whether remote
scores were shown mid-game.  If the value's not as expected just don't
show the score.
2011-02-18 17:43:01 -08:00
Andy2
da6d7da350 always say the net's available when on simulator. The net-up
notification stuff just doesn't work there.
2011-02-18 17:41:15 -08:00
Andy2
cd01c32ad1 When launched with a list of relayIDs (presumably because data has
arrived for them), open the first corresponding game for which the
dictionary is still there.
2011-02-17 17:41:53 -08:00
Andy2
2e9d87fddc override gameDictHere to allow null params 2011-02-17 17:40:35 -08:00
Andy2
c271cb2fdd add a clear-history menu to chat 2011-02-17 07:14:58 -08:00
Andy2
b3ffb4895b use background rather than text color to separate local and non- chat. 2011-02-17 06:56:48 -08:00
Andy2
c844e9165d limit knowledge of how history is stored to DBUtils. 2011-02-17 06:27:48 -08:00
Andy2
fec402cf50 display chat history as a scrolling list of TextView objects rather
than in a single TextView so different styles can be applied based on
whether text is from local or remote device.  For now text is just
grey if local.
2011-02-16 18:53:47 -08:00
Andy2
736860685b add a Send button to the chat activity and send on it rather than <cr>. 2011-02-16 18:13:54 -08:00
Andy2
0c9b053844 save into DB rather than drop chat messages received in background.
Still need to add UI to let user know a new message is there.
2011-02-16 07:37:14 -08:00
Andy2
a954977e56 white-space difference only: fix indentation. 2011-02-16 07:13:41 -08:00
Andy2
1400de489d implement chat with an activity rather than a little dialog. Include
history, and store it in the game record in the DB (new column).  This
will allow to not drop chat messages that arrive in the background,
though that's not implemented yet.
2011-02-16 06:55:46 -08:00
Andy2
9eba54344b get rid of theme stuff. It's broken and looks like crap. When
there's enough color control to make a different theme look good put
this change back and fix it.
2011-02-14 20:14:48 -08:00
Andy2
526b3c1bef register receiver with app context rather than a single activity's so
that it doesn't leak when that activity goes away.
2011-02-14 18:12:46 -08:00
Andy2
0354c3f1d9 sort by creation time rather than lastsaved time. This is a temporary
workaround to fix a bug where the UI isn't updating often enough and
sometimes delete or other position-based long-tap menu actions on the
list act on the wrong game.  This gives an order that won't change.
Revisit later if a more dynamic order is desired.
2011-02-14 18:11:55 -08:00
Andy2
700c58d6dc drop any relayIDs for which messages didn't have any effect on the
game they were passed to.  This prevents duplicate messages from
generating notifications over and over -- and dupes are common when
messages stay on relay until the receiving game ACKs them.
2011-02-14 07:08:35 -08:00
Andy2
688fadb965 override onNewIntent to inval games whose ids have changed 2011-02-14 07:07:05 -08:00
Andy2
fffeceb665 include list of changed relayIDs in intent used to relaunch GamesList. 2011-02-14 07:06:16 -08:00
Andy2
be4bb3a73e set launchMode of GamesList activity to singleTask. This seems to be
the only way to have it wind up on top *and without it being a second
instance of the activity* when relaunched in response to a move-made
notification.  Even passing the SINGLE_TASK flag to the relaunching
Intent doesn't accomplish this.
2011-02-14 07:04:34 -08:00
Andy2
c2aa7438c7 get rid of excess logging 2011-02-14 06:13:20 -08:00