Andy2
dd82fa02ad
remove chat menuitem -- it's only a button now.
2010-10-23 14:00:24 -07:00
Andy2
314872d533
shrink needs-sync flag icon
2010-10-23 13:52:56 -07:00
Andy2
9383ef064d
use sync icon instead of "M" to mark games with data.
2010-10-23 13:45:31 -07:00
Andy2
43ad43b604
change meetup server back to relay
2010-10-23 11:24:19 -07:00
Andy2
b6dfa0be8b
disable background-checking code for now: make default be disabled and
...
remove Preference that allows to change it.
2010-10-23 11:19:55 -07:00
Andy2
5a5c73916e
Don't allow copy of relay-connected game.
2010-10-23 11:08:33 -07:00
Andy2
593dac9d99
rotate 90 degrees
2010-10-22 22:04:09 -07:00
Andy2
7765bd0a1a
move decision how to display connection info from CommsTransport to
...
BoardActivity (where it'll be easier to include optional not-again dialog)
2010-10-21 20:13:41 -07:00
Andy2
8fac0945b9
chat not-again message without obscenities
2010-10-21 19:22:17 -07:00
Andy2
99dbbb443c
add comms_canChat, which knows better than java code what state a
...
connected game is in, and call it to determine whether to show the
chat icon.
2010-10-21 19:14:10 -07:00
Andy2
198f39b606
don't use yes button for simple ok dialog
2010-10-21 19:12:04 -07:00
Andy2
ae97d7d0f4
shouldn't have commented that out...
2010-10-21 06:51:26 -07:00
Andy2
aa0be5e2f2
remove unused imports
2010-10-21 06:50:29 -07:00
Andy2
ea617f39fa
to deal with not being implement a common superclass for Activity and
...
ListActivity create a delegate they use for dialog-related stuff.
Move code from them into it -- and delegate.
2010-10-21 06:33:04 -07:00
Andy2
5599f91232
new prefs key and string for not-again help dlg for chat
2010-10-21 06:31:28 -07:00
Andy2
848c1493fd
chat button enabled only for multi-device games. Needs to be disabled
...
for unconnected games as well....
2010-10-21 06:30:48 -07:00
Andy2
8a891816b4
add chat button
2010-10-21 06:28:01 -07:00
Andy2
5c9cf0ebc8
add first helptext dialog, with do-not-show-again button, attached to
...
the sync menuitem. The plan's that a bunch of these will make the
game easier for newbies to use.
2010-10-20 20:48:18 -07:00
Andy2
0d4f77fb0a
add sync icon to games list menu
2010-10-20 20:00:40 -07:00
Andy2
8788f9d4d5
move OK dialog to new scheme. Using a static global Bundle instead of
...
the newer form of showDialog because that requires version 8 of the
SDK.
2010-10-20 19:52:13 -07:00
Andy2
c1dc34e25d
move common dialog code from Utils to XWActivity and XWListActivity
...
(which delegates to XWActivity.)
2010-10-20 18:34:41 -07:00
Andy2
8db6c7ad7f
add setPrefsBoolean
2010-10-20 18:09:24 -07:00
Andy2
95f5c2e023
cleanup: add missing string; remove unused strings and array.
2010-10-19 18:43:26 -07:00
Andy2
01e926e8b3
up sdk version to silence warning
2010-10-19 18:42:32 -07:00
Andy2
17f1790d52
remove unused layout files (since they take up space in the .apk even
...
if never referenced)
2010-10-19 18:42:07 -07:00
Andy2
85e32907f0
remove '\r's
2010-10-19 18:39:27 -07:00
Andy2
1fecf9dbb4
implement new check-relay menu, and use new task to check for messages
...
if there are any connected games.
2010-10-19 07:54:52 -07:00
Andy2
4a5c0832d4
use new generalized code to check for messages.
2010-10-19 07:54:10 -07:00
Andy2
94b8aedda7
generalize relay-msg-check code so can be used from two places.
2010-10-19 07:53:26 -07:00
Andy2
d1b1e6db14
refactor into common subroutine -- no behavior change
2010-10-19 07:50:23 -07:00
Andy2
994a73e28b
return null, not empty list, when nothing found
2010-10-19 07:49:54 -07:00
Andy2
f31e28dbd7
menu and strings for check-server menu added to GamesList
2010-10-19 07:49:23 -07:00
Andy2
ab8c3f985e
add generic info dialog that, with luck, can be reused.
2010-10-19 07:48:34 -07:00
Andy2
b718804a4b
new AsyncTask for pinging server on demand
2010-10-19 07:47:05 -07:00
Andy2
9cfb302a2f
don't populate room name; better that people see the hint
2010-10-18 06:48:26 -07:00
Andy2
db3c4da01f
set a default value that actually exists
2010-10-18 06:47:31 -07:00
Andy2
b4c1710c66
remove strings dropped with prev change
2010-10-18 06:31:19 -07:00
Andy2
62d054cd46
default show-robot-scores to true; move background-check-frequency
...
within existing PreferenceScreen
2010-10-18 06:30:56 -07:00
Andy2
a2f0ec232a
put back RestartTimer call inadvertently removed
2010-10-18 06:23:24 -07:00
Andy2
dda6e056a0
set summary from the array of use-visible values
2010-10-18 06:18:37 -07:00
Andy2
2d66913323
populate public rooms list as soon as checkbox set -- and mention
...
language and number of players in failure message
2010-10-17 21:13:14 -07:00
Andy2
56e83bfc1c
trim leading and trailing whitespace from roomnames. If somebody has
...
two spaces between words those will still matter.
2010-10-17 20:45:48 -07:00
Andy2
6b7a92534a
make default relay port 10997 (and change key so it'll apply for everybody)
2010-10-17 20:37:51 -07:00
Andy2
332ff27d8a
use same string for both
2010-10-17 20:30:43 -07:00
Andy2
a58e74b70a
add play game button at bottom of game config dialog.
2010-10-17 20:27:21 -07:00
Andy2
5c958eaadb
deal with null socket (e.g. if in airplane mode); deal with new public
...
rooms format.
2010-10-17 20:18:24 -07:00
Andy2
1621e5932a
give label different text from dialog title
2010-10-17 20:00:41 -07:00
Andy2
8972df7b88
add explanatory title to phonies spinner
2010-10-17 18:55:09 -07:00
Andy2
885bfe4779
remove values button. Seven buttons is too much. Add back when have
...
means of assigning priority so it only shows up when there's space.
2010-10-17 18:42:44 -07:00
Andy2
2cd0bf8c24
add singleline and selectonfocus for roomname edit
2010-10-17 12:45:34 -07:00
Andy2
b63d730b53
compare languages rather than actual dict names so can switch dicts
...
mid-game.
2010-10-16 15:05:46 -07:00
Andy2
60e4c624e4
implement reply button; clear message edit field each time
2010-10-16 15:05:16 -07:00
Andy2
21afd79751
make send message first rather than last menuitem
2010-10-16 15:04:12 -07:00
Andy2
26b777acf8
don't post notification when results list returns empty
2010-10-16 11:01:12 -07:00
Andy2
a82051739b
move interface; add some logging.
2010-10-16 10:49:25 -07:00
Andy2
91e95eb48b
fix string (which should not be hard-coded!) and use new class.
2010-10-16 10:48:59 -07:00
Andy2
02ea8b13e0
move this functionality into RelayReceiver
2010-10-16 08:08:12 -07:00
Andy2
737b146093
Receiver replaces Activity as target of alarms. This seems to prevent
...
flasing to the front when alarms fire which was causing all kinds of
grief. But: not yet tested on device.
2010-10-16 08:07:48 -07:00
Andy2
cd1ce339ed
fix off-by-one error in reading from cursor
2010-10-16 07:57:47 -07:00
Andy2
a52c18522c
use HashSet rather than relying on nesting (which I can't) to track
...
whether I'm running
2010-10-12 18:53:19 -07:00
Andy2
34428b3460
new Activity class
2010-10-12 18:28:05 -07:00
Andy2
82d5f21d54
extend subclass of Activity or ListActivity
2010-10-12 18:27:50 -07:00
Andy2
c37ad2d650
register self with RelayService to be called directly if running when
...
there's something to update. Use handler to do this from non-UI thread.
2010-10-12 18:27:13 -07:00
Andy2
8e8c4f4d31
if GamesList is frontmost when we have relayIDs to update then just
...
call the interface it's registered. Otherwise post notification.
2010-10-12 18:25:29 -07:00
Andy2
ad9a249042
new files. Subclass Activity and ListActivity to track whether we're
...
running (yeah, WTF, but that's what Android dev support says you have
to do!). Special-purpose Activity to be the target of notifications
so I have more control on how to handle them.
2010-10-12 18:21:18 -07:00
Andy2
673c9858cb
fire every 30 for testing
2010-10-12 05:24:23 -07:00
Andy2
b124a3f438
add every-five-minutes option; change 10-seconds debug option to 60
2010-10-11 06:54:02 -07:00
Andy2
392aeff7ad
replace FLAG_ONE_SHOT with FLAG_UPDATE_CURRENT; seems to fix failure
...
of notification to fire.
2010-10-11 06:52:26 -07:00
Andy2
86b57526df
show game name in title if not hidden
2010-10-11 06:47:33 -07:00
Andy2
56cd161d8b
Pass list of relayIDs through activity to onNewActivity() added to
...
GamesList, and inval those list elements that now have messages
pending so they redraw. And add static method to be called from there
to cancel the status-bar notification now that it's been acted on.
2010-10-09 21:44:42 -07:00
Andy2
6ad074182f
make GamesList singleTop so notifications go to existing activity
2010-10-08 17:33:44 -07:00
Andy2
7d9c143d15
string doesn't need localizing
2010-10-08 17:32:51 -07:00
Andy2
76258f609a
make sure game is still over before calculating final scores. Fixes
...
assertion failure in server.c.
2010-10-08 17:30:26 -07:00
Andy2
97d96add5e
add stubbed-out strings
2010-10-08 06:53:41 -07:00
Andy2
e855b51491
use new DB api to build list of relayIDs to send; set summary DB field
...
and post notification on response.
2010-10-08 06:52:43 -07:00
Andy2
3bbbd65077
use same 1.5-safe layout on all devices; add elem (a text field for
...
now) to be shown when messages are pending; show it.
2010-10-08 06:47:46 -07:00
Andy2
6ce5f36133
add msgsPending field set from new DB column; add methods to set
...
column and to fetch relayIDs for games where it's not set, and to get
path for game based on relayID.
2010-10-08 06:46:10 -07:00
Andy2
d5eff5af21
new column to track whether game has pending msgs
2010-10-08 06:42:51 -07:00
Andy2
cb4092bb39
make relayID a String rather than a byte[]; log result of pending
...
messages query to confirm working.
2010-10-06 05:21:19 -07:00
Andy2
a78c4b304e
custom class for pref
2010-10-05 18:39:00 -07:00
Andy2
df939249e4
fix caps and add too-long string
2010-10-05 18:38:46 -07:00
Andy2
861de8d592
call new method to start polling timer
2010-10-05 18:38:06 -07:00
Andy2
81fb934e4a
new custom class for resetting polling timer on prefs change
2010-10-05 18:36:56 -07:00
Andy2
cd0d14b1bb
new class will own setting summary for relay-polling frequency so don't do it here
2010-10-05 18:36:15 -07:00
Andy2
ae6edf4ace
add static methods for starting timer.
2010-10-05 18:35:35 -07:00
Andy2
ed95d2e794
add proxy port to list whose values are displayed
2010-10-05 06:17:35 -07:00
Andy2
fae8faa0be
add stubbed-out Reply button to msg received dialog.
2010-10-04 18:59:44 -07:00
Andy2
1ed8e7a66c
fix crash: can't call dialog from non-UI thread
2010-10-04 18:53:33 -07:00
Eric House
b3c7cb3711
start on sending chat messages. Doesn't even compile -- committing to get onto another machine.
2010-10-04 05:38:05 -07:00
Eric House
1e13e92deb
support for receiving and displaying chat messages. Compiles but not tested.
2010-10-03 18:32:39 -07:00
Andy2
f78b1747dd
put up an alert when unable to find any public rooms
2010-09-28 18:58:05 -07:00
Andy2
0bfad7cd05
up timeout to 15 seconds.
2010-09-28 18:42:23 -07:00
Andy2
2610ef34ac
move dict above connection settings since it provides a parameter
2010-09-28 18:38:47 -07:00
Andy2
814f6887da
put up a progress dialog while fetching public names that mentions
...
params passed.
2010-09-28 18:34:29 -07:00
Andy2
0b143efced
add getLangName
2010-09-28 18:33:29 -07:00
Andy2
6b1dabd8e2
don't crash when public rooms list is empty
2010-09-28 18:32:43 -07:00
Andy2
953e4601b9
fetch public rooms using new class rather than hardcoding. With this
...
checkin game is possible based on public-room lookup.
2010-09-28 06:48:51 -07:00
Andy2
132321c9fd
new AsyncTask subclass to fetch public rooms list from relay
2010-09-28 06:47:58 -07:00
Andy2
89d20578b8
new class to create socket for talking to proxy
2010-09-28 06:47:21 -07:00
Andy2
39827ec894
add new pref for relay's proxy/device port
2010-09-28 06:43:04 -07:00
Andy2
986ac4413f
parse reply to query for number of pending messages for games on
...
device. Not doing anything with the info yet.
2010-09-26 20:25:00 -07:00
Andy2
14edbd7f18
implement setIsServer(). With this change I've been successful --
...
once -- having two games on the same device play against each other.
2010-09-24 18:49:34 -07:00
Andy2
31c594a06e
everybody starts out as client by default, same as on linux
2010-09-24 18:48:52 -07:00
Andy2
63ac6542c6
add new action to be called when relay make me a client. Seems
...
necessary to get server_initClientConnection connection called when
all's in the right state. It's not working consistently yet, though,
so may need changes.
2010-09-24 18:48:30 -07:00
Andy2
16001e61d0
image forgotten earlier -- for refresh public games list button
2010-09-24 18:46:14 -07:00
Andy2
4ea9ff8226
add server_reset and util_setIsServer to jni
2010-09-24 18:45:42 -07:00
Andy2
0df651027f
Merge branch 'android_branch' into relay_proxy
...
Conflicts:
xwords4/relay/crefmgr.cpp
2010-09-20 19:55:53 -07:00
Andy2
bca8300495
changes for b16: version strings and changes summary text.
2010-09-20 19:48:52 -07:00
Andy2
ddedcee3eb
remove commented out foo -- needed to save before prev submission.
2010-09-20 19:39:35 -07:00
Andy2
9b98d89722
add mimeType entry to data. This coupled with the right apache
...
AddType config means the browser doesn't get a chance to download
dicts, giving users one less way to get confused.
2010-09-20 19:38:26 -07:00
Andy2
0ac23458ba
use constant
2010-09-20 18:42:43 -07:00
Andy2
4e9d6e712e
escape apostrophe -- new SDK requires it.
2010-09-20 06:18:53 -07:00
Andy2
e6545d8d57
set and save new booleans, etc. Relay params UI seems to work now
...
except for listing public rooms (still hard-coded)
2010-09-03 06:39:46 -07:00
Andy2
b742c7dbb7
add new booleans to relay address record around public rooms
2010-09-03 06:38:46 -07:00
Andy2
e20c63f38c
move toward the UI I want: show public room browser or edittext for
...
new room name depending on checkbox, etc. Still not fully wired.
2010-09-02 05:46:35 -07:00
Andy2
c6c1a93de5
copy new dictLang field java<->c
2010-09-01 06:51:09 -07:00
Andy2
6d7ff11dcc
add and set new field, dictLang
2010-09-01 06:50:33 -07:00
Andy2
73746e3664
first cut at relay config section, inline this time, with refresh
...
button and make-public checkbox. Neither wired up nor hidden in
non-networked case.
2010-09-01 06:49:01 -07:00
Andy2
cad2854d08
fix bug by always enabling set of widgets for local player in case
...
prev invocation of dialog hid it.
2010-08-31 06:21:46 -07:00
Andy2
784b5c8cdf
tweak strings
2010-08-31 06:20:48 -07:00
Andy2
4d1d7ae7ce
put space between "Player 1" and "(robot)"
2010-08-31 06:20:29 -07:00
Andy2
9367251b33
lots of changes, still needing cleanup and a bit of debugging, to
...
simplify game settings dialog and remove role: a game is now
standalone or not. Games will be matched on the relay (or over BT, I
assume) based on how many players they provide vs. need -- and other
settings like dictionary
2010-08-31 05:43:41 -07:00
Andy2
adf9c28e0d
make games list item as tall without delete button as is with.
2010-08-30 20:44:01 -07:00
Andy2
785ae531db
add language name to dict names in GameConfig's menu too
2010-08-27 06:26:25 -07:00
Andy2
092236b0dd
cleanup; do formatting inside DictLangCache
2010-08-27 06:25:56 -07:00
Andy2
40e266dda0
move lang strings into cache and add method to get 'em
2010-08-26 18:43:59 -07:00
eehouse@eehouse.org
ecd0280353
Merge branch 'android_branch' into relay_proxy
2010-08-26 18:36:55 -07:00
Andy2
5ddbef7829
update for b15
2010-08-26 18:33:22 -07:00
Andy2
0f3867b995
up constants/version for beta 15
2010-08-26 18:22:18 -07:00
Andy2
0313421634
Add new class to cache lang codes for dicts to prevent expensive
...
operation of loading them each time. Will have other uses later.
2010-08-26 18:14:14 -07:00
Andy2
40d8aede88
use new jni method and array of names to append language to name of dict
2010-08-25 06:34:54 -07:00
Andy2
51e2c61962
add array mapping lang code (the proprietary code stored in dicts) to
...
language name. (Names should be translated.)
2010-08-25 06:34:29 -07:00
Andy2
cf6d8efb29
new jni method to get lang code. Takes a dict's raw bytes and builds
...
a dict object just to fetch the code, which is pretty inefficient, so
caching should be added later on the java side.
2010-08-25 06:33:16 -07:00
Andy2
3b52f7bbd0
don't connect proxy unless there's at least one relay game
2010-08-23 18:53:11 -07:00
Andy2
b586fa1a34
add preference controlling how often proxy connects to relay. Still
...
need to add way to change timer when interval pref is changed and
other cleanup.
2010-08-23 18:39:47 -07:00
Andy2
a34ccb424f
device now passes list of "relayID"s, consisting of connName plus
...
device id, to relay, one for each stored game that's communicating via
the relay. Relay parses out each relayID. Next relay can use these
to look up whether messages are available and reply with that, and
device can put up a notification.
2010-08-22 12:16:57 -07:00
Andy2
56b6a425e2
proxy now writes one byte to relay and reads one byte reply.
2010-08-19 18:34:28 -07:00
Andy2
48ac79be51
GamesList starts a repeating alarm that invokes a new activity that
...
launches the service. Service can now do a single check with the
relay, notify if needed, and exit (but doesn't yet.)
2010-08-19 08:45:18 -07:00
Andy2
25e7889c28
checkpoint: add service that's launched at app start and spawns a
...
thread that stops itself immediately. Eventually that thread will
check the relay for pending moves, put up a notification offering to
open the game that has moves pending, and schedule itself to run again
later before stopping itself.
2010-08-19 07:47:11 -07:00
Andy2
38ed6e4054
add missing close tag
2010-08-11 21:10:10 -07:00
eehouse@eehouse.org
a791b0e53e
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2010-08-11 20:00:38 -07:00
Andy2
ac022ea5a5
add java version of new crosshairs flags; draw crosshairs 1/3
...
width/height of cells instead of reusing focus code to color
background.
2010-08-11 18:53:12 -07:00
Andy2
d44b08b609
remove unused and confusing duplicate flags.
2010-08-11 18:51:33 -07:00
Andy2
81ad7719b1
list changes since b13
2010-08-10 21:34:44 -07:00
Andy2
fc603645d1
make changes dialog launchable from About dialog (so reachable other
...
than immediately after upgrade)
2010-08-10 20:33:33 -07:00
Andy2
e720fe79ab
wrap in ScrollView so can scroll
2010-08-10 20:32:04 -07:00
Andy2
287ab2485f
add changes summary dialog shown on first launch after an upgrade.
2010-08-10 18:48:19 -07:00
Andy2
269bd15a45
change constants for beta 14
2010-08-10 06:12:09 -07:00
Andy2
13596f8538
synchronize read and write of files, fixing a race condition between
...
BoardActivity shutdown (save) and GamesList refresh (open) that
resulted in zero-length byte array being passed into the jni. It's
now possible for the list to win the race and display old data, so a
better solution would be to check-out the file in such a way that the
list couldn't read it until it was update, but at least now we won't
crash.
2010-07-30 17:40:46 -07:00
Andy2
d07d90761f
remove logging
2010-07-30 17:38:07 -07:00