Eric House
aec70782f4
tweaks to get game initialization working, including not looking on
...
startup for incoming text messages if on KITKAT or above.
2015-01-22 07:37:06 -08:00
Eric House
c3482925b4
Send NLI data for invitation instead of field-by-field. Try to prevent
...
duplicate phone number entries when the same number is formatted
differently.
2015-01-20 07:57:08 -08:00
Eric House
4b345ff28e
new methods to store and retrieve byte arrays
2015-01-20 07:52:49 -08:00
Eric House
f8e530da9b
Snapshot toward making SMS work again: invites now work via
...
user-visible SMS, providing a URL same as email that launches the app
with a new game. Game works sending via NBS (data SMS) when both
devices are on GSM (T-mobile, anyway.) Plan is to use os version and
gsm info included in invite to warn user when the game can't
communicate, but that test isn't done yet. Also removed debug pref
allowing to force send by NBS.
2015-01-18 10:49:15 -08:00
Eric House
f05d8c774e
include class name in log
2015-01-17 22:11:20 -08:00
Eric House
71839b1e85
add READ_PHONE_STATE permission so I can send my phone number in invitatiosn
2015-01-17 22:00:43 -08:00
Eric House
182b651d21
remove unused import
2015-01-17 14:54:37 -08:00
Eric House
1da2ba7220
move commas -- no code change
2015-01-17 08:52:24 -08:00
Eric House
5f657bdfc4
add new change-connect-via button to set disabled when game in play
2015-01-17 08:13:54 -08:00
Eric House
e5ac525087
provide default default language name (and rename string constant
...
being used that way now too)
2015-01-16 21:28:59 -08:00
Eric House
004cd350fc
fix uri encoding/decoding so that invite-by-email works
2015-01-16 21:07:55 -08:00
Eric House
31b524e6c0
include forceChannel in emailed invitations
2015-01-15 07:03:35 -08:00
Eric House
306c9ef4b6
hide relay-related stuff when relay communication not enabled; remove
...
sms status stuff altogether.
2015-01-13 21:59:54 -08:00
Eric House
d035396371
string tweak
2015-01-13 21:51:36 -08:00
Eric House
d1c300d752
string tweak
2015-01-13 21:51:27 -08:00
Eric House
af7335c729
refactor
2015-01-13 21:38:27 -08:00
Eric House
7e28d2004b
add button to game config activity for changing the connection types to be used in that game
2015-01-13 21:27:51 -08:00
Eric House
2073098a5e
fix crash: adding wrong item to list
2015-01-13 19:53:02 -08:00
Eric House
1139b1d5d1
put some space before all but the first heading
2015-01-13 19:42:19 -08:00
Eric House
ea62b90f61
show conn status based on most recently successful connType
2015-01-12 08:00:20 -08:00
Eric House
fc9c262796
catch exception whose cause I'm not sure of but that make it
...
impossible to launch the app when a game gets into a certain
state. Probably need to catch exceptions at a top level of game
listing process and offer to discard those in which non-recoverable
exceptions occur. Later...
2015-01-12 07:27:24 -08:00
Eric House
5c00e31d95
BT sends fail all the time, e.g. when BT isn't enabled on
...
remote. Until I figure out how to not try BT after some point, don't
log exceptions.
2015-01-12 07:24:39 -08:00
Eric House
951f5462b3
remove assert. Can't always get forceChannel right on creation, and
...
it's mean to be advisory.
2015-01-12 07:23:50 -08:00
Eric House
a49e732371
remove logging
2015-01-12 06:26:03 -08:00
Eric House
2fa0ea3375
fix new game alert titles to differ depending on type being created
2015-01-12 06:25:28 -08:00
Eric House
70e4d06e73
don't crash when ctrl-d hit in console
2015-01-07 07:23:40 -08:00
Eric House
861aeeb53a
don't crash when ctrl-d hit in console
2015-01-07 07:22:45 -08:00
Eric House
0caf30c4e7
fix forceChannel for NFC invite
2015-01-07 06:53:36 -08:00
Eric House
688b3944bb
fixes to invite: don't allow non-servers to invite; have common code
...
inform of number of missing even when it hasn't dropped to 0 (so
second invite can be sent for 3+ device games); take down older alerts
before posting new (again since number of missing may have changed)
2015-01-05 07:43:45 -08:00
Eric House
50f29383f5
tweak invite message to not require all invitations to be sent at once
2015-01-05 07:41:31 -08:00
Eric House
e394bf01e8
add assertion
2015-01-05 07:40:01 -08:00
Eric House
6da1b54636
add preference controlling whether more than on player is invited per
...
remote device
2015-01-05 06:32:16 -08:00
Eric House
05aaffb933
cleanup
2015-01-05 06:31:46 -08:00
Eric House
af6f01fd9c
tweak drawing and size of status icon background
2015-01-03 22:18:30 -08:00
Eric House
f39b5e8e82
separate heads in new game icon too
2015-01-03 17:22:57 -08:00
Eric House
327b20a9fe
add white space between the heads
2015-01-03 17:20:31 -08:00
Eric House
ddd1efd8dd
modify new game actionbar icons to derive from game status icons
2015-01-03 16:44:13 -08:00
Eric House
641d83ab48
use new game type icons
2015-01-03 15:17:12 -08:00
Eric House
d1d6a2669b
snapshots of icons
2015-01-03 14:57:19 -08:00
Eric House
6f64ff062e
one shot at new one-device game icon
2015-01-03 10:33:32 -08:00
Eric House
4701fe2b90
pass in number of devices already connected so forceChannel can be set
...
more correctly; put up alert when device rejects an invitation as a
duplicate.
2015-01-03 09:50:07 -08:00
Eric House
9e67106adc
fix crash by always initializing
2015-01-03 09:49:10 -08:00
Eric House
a7cc96c697
add ability to invite more than one player per device. This is mostly
...
for testing and needs to be hidden by an "advanced" pref so folks
don't stumble onto it. Works for BT (SMS will crash), but needs
cleaning up.
2014-12-31 06:54:31 -08:00
Eric House
d46c7a39f1
pass forceChannel as part of invitation
2014-12-30 07:25:26 -08:00
Eric House
28bfa3c904
make forceChannel part of CurGameInfo rather than comms, since Android
...
needs to save it there on receipt of an invitation (doesn't create
full game with comms until later.) Passes discon2 tests and seems to
work on a single Android device. (Haven't tested inviting on Android
yet.)
2014-12-29 07:39:28 -08:00
Eric House
e8bb624b0b
add preference checkbox for hiding newgame buttons (which are
...
duplicated by menu items)
2014-12-29 07:02:56 -08:00
Eric House
3209fc1b74
log sqlite error codes as strings in attempt to track down the
...
occasional assertions failure.
2014-12-28 21:40:31 -08:00
Eric House
3b7afa4557
pass --server if not setting forceChannel
2014-12-28 21:39:11 -08:00
Eric House
897c4d5786
add param to force a client to connect to host requesting a particular
...
channel. Works well enough that relay test script works. Not yet
integrated for let alone tested on Android.
2014-12-21 17:40:00 -08:00
Eric House
d81f022c78
Merge branch 'android_branch' into android_multi2
...
Conflicts:
xwords4/linux/scripts/discon_ok2.sh
2014-12-15 16:48:10 -08:00
Eric House
4123de3560
merge android branch heads
2014-12-15 16:44:32 -08:00
Eric House
30d2c84dcc
so tests can continue, comment out an assertion that indicates a relay
...
bug that neverless doesn't prevent games from running to completion.
2014-12-15 16:43:24 -08:00
Eric House
26b01acf23
fix crash on duplicate connect packet: drop it, but keep the
...
connection alive if the duplicated packet set up addressing correctly.
2014-12-15 16:42:34 -08:00
Eric House
eb5ae9edd3
declare as little-a array so key will be listed in numeric order
2014-12-15 16:41:15 -08:00
Eric House
45ef4fcb65
add --dup-packets calling through to linux client
2014-12-15 16:14:59 -08:00
Eric House
92fd048eef
signature change: return void instead of always returning true
2014-12-15 15:33:12 -08:00
Eric House
4835afbe4a
simplify and print in order
2014-12-15 15:29:37 -08:00
Eric House
7560156351
summarize the number of tiles left every 20 passes to give better view
...
into games' progress
2014-12-15 15:11:29 -08:00
Eric House
1eb7d01be5
add option to turn on duplicate packets -- which fires an assert on
...
the relay instantly.
2014-12-11 20:23:51 -08:00
Eric House
ddc9f7994c
Merge remote-tracking branch 'sf/android_branch' into android_multi2
...
Conflicts:
xwords4/relay/crefmgr.h
2014-12-11 06:22:17 -08:00
Eric House
bf53481aad
log unexpected condition rather than asserting
2014-12-11 06:18:30 -08:00
Eric House
16c4e74e04
ignore client index of 0, since it means the device needs a slot
...
assigned.
2014-12-10 08:04:56 -08:00
Eric House
2e9c033a29
If client provides its index, honor that when placing it in game. This
...
allows a game where indices have already been established over some
transport other than relay to start using the relay mid-game.
2014-12-10 08:03:39 -08:00
Eric House
39b0d40e41
add local variable to prevent some dereferencing
2014-12-10 08:02:20 -08:00
Eric House
f0cf77d7d6
fix overwriting of addresses that happened for most (relay-only) games
...
run by my test script: match records based on channel number only.
This has yet to be tested on multi-addressing Android builds.
2014-12-10 07:54:50 -08:00
Eric House
00d19eada6
log a few more message checksums
2014-12-10 07:48:51 -08:00
Eric House
68441c60f6
add local variable to prevent some dereferencing
2014-12-10 07:48:38 -08:00
Eric House
9ff7cd1ff9
comment out dead code so I stop trying to debug it
2014-12-10 07:47:36 -08:00
Eric House
e961756f12
give up on hard-coding size of thread->env map: expand it as needed.
2014-12-08 20:43:24 -08:00
Eric House
97092e361c
update grepped string to match changes in logging
2014-12-08 06:23:18 -08:00
Eric House
c70fcf64a7
ignore client index of 0, since it means the device needs a slot
...
assigned.
2014-12-08 06:22:30 -08:00
Eric House
f84f9aa85f
include timestamp of switch to UDP -- in case it needs to be
...
correlated with logs
2014-12-08 06:20:47 -08:00
Eric House
a80293ba82
include timestamp in "new day" post-crash line
2014-12-05 06:39:10 -08:00
Eric House
b8660470f7
include timestamp in "new day" post-crash line
2014-12-05 06:35:31 -08:00
Eric House
5935681b82
in getDestID, deal with possibility game was consumated via a
...
non-relay channel, and allow client to use HOST_ID_SERVER.
2014-12-05 06:19:02 -08:00
Eric House
9ba9d258f3
If client provides its index, honor that when placing it in game. This
...
allows a game where indices have already been established over some
transport other than relay to start using the relay mid-game.
2014-12-04 06:03:42 -08:00
Eric House
a6f9f6608a
drop relay connect meta-messages (as well as game messages) when relay
...
send is disabled.
2014-12-02 06:52:48 -08:00
Eric House
b2b60d6c48
add commandline params that disable comms types on game creation so
...
relay not connecting initally can be tested.
2014-12-02 06:49:35 -08:00
Eric House
c8e55a85a3
use a constant; log a bit more for now
2014-12-02 06:08:58 -08:00
Eric House
a1b967033f
summarize role based on relay if in use, bt or sms otherwise
2014-12-02 06:08:18 -08:00
Eric House
73851b285e
fix a couple of NPEs
2014-12-01 07:01:10 -08:00
Eric House
fe76cfa1a1
remove logging
2014-11-26 07:21:27 -08:00
Eric House
9bdf9b2f5e
pass conType into java world from jni send proc, eliminating loops
...
e.g. sending relay setup traffic over BT.
2014-11-26 07:18:29 -08:00
Eric House
eac026a1a1
remove unused string
2014-11-25 07:18:16 -08:00
Eric House
0250f42b36
remove dead invite code
2014-11-25 07:17:52 -08:00
Eric House
8974407a67
setTitle: it's either networked or not
2014-11-25 07:17:03 -08:00
Eric House
2df8c68e60
remove commented-out logging
2014-11-25 07:16:43 -08:00
Eric House
938756a34f
switch for loop to using C99-style variable declarations; no other change
2014-11-25 06:09:18 -08:00
Eric House
53bfe9812d
add const
2014-11-24 07:52:03 -08:00
Eric House
363215841d
add assert
2014-11-24 07:50:54 -08:00
Eric House
a1cdef6ad8
fix log format
2014-11-24 06:30:58 -08:00
Eric House
f3828ab7c9
merge android_branch -> android_multi2
2014-11-22 17:15:22 -08:00
Eric House
83a79963d4
Merge remote branch 'origin/android_branch' into android_branch
2014-11-22 17:11:40 -08:00
Eric House
4b635791d7
crash fix: provide missing param to format string
2014-11-22 17:08:17 -08:00
Eric House
963b0e23cf
don't send bt pings on non-bt addresses
2014-11-21 23:00:16 -08:00
Eric House
142861656e
don't send when channel address doesn't have the right type yet
2014-11-21 22:53:48 -08:00
Eric House
80229376e9
include connection types string in header text
2014-11-21 08:02:55 -08:00
Eric House
38e37bfbb9
use gameID as inviteID when it's not provided. Originally it was a
...
relay-only thing, but it's associated with being not-standalone in
places and this seems like the easiest fix.
2014-11-21 08:02:18 -08:00
Eric House
67d41f34a3
remove loggin
2014-11-21 07:58:17 -08:00
Eric House
6c917f34ba
fix race-condition assert by dropping message. This needs a better fix.
2014-11-21 07:57:58 -08:00
Eric House
c3ca257a10
oops: new style
2014-11-20 19:13:15 -08:00
Eric House
d08a7f8d24
use a style for new game buttons
2014-11-20 19:12:56 -08:00
Eric House
8d021aa11e
trying to hide the buttons when they take too much space. Leaving
...
commented out for now
2014-11-20 19:11:22 -08:00
Eric House
301ce8bc3c
spelling error in comment :-)
2014-11-20 18:57:57 -08:00
Eric House
4b30d98bd0
fix to compile with DEBUG off
2014-11-20 07:16:37 -08:00
Eric House
fbea67e479
don't kill relay when bluetooth turned off: pass comms type into
...
comms_transportFailed()
2014-11-20 07:12:25 -08:00
Eric House
d3d83b3557
cleanup
2014-11-20 06:21:22 -08:00
Eric House
a35527ae88
need to copy in BT address too
2014-11-20 06:21:14 -08:00
Eric House
e236a32c20
forgot a mutex
2014-11-20 06:04:11 -08:00
Eric House
56121fdcd4
stop (or at least greatly reduce) leakage of thread->env mappings in
...
jni, mostly by having jnithread explicitly announce that it's closing.
Yuck. This stuff *should* obey a stacking protocol but the callback
stuff I'm doing makes me unsure that can work.
2014-11-19 21:42:21 -08:00
Eric House
a1bbbe3371
separate the new-game icons into two (as stubs)
2014-11-19 19:26:08 -08:00
Eric House
ae81404215
remove assert that was firing
2014-11-19 19:25:42 -08:00
Eric House
7977c8f799
cleanup
2014-11-19 19:19:12 -08:00
Eric House
1962371fe2
flesh out MultiMsgSink so that subclasses invoked e.g. in response to
...
BT traffic can send messages via other means as well. Relay games
with both participants on one device work again.
2014-11-19 18:46:35 -08:00
Eric House
f14a1c095f
print all conn types, not just the first
2014-11-17 07:06:56 -08:00
Eric House
11f7083eb6
remove dead classes and layouts; add menu to create networked games.
2014-11-15 20:42:09 -08:00
Eric House
64276b041e
echo so I know it's doing something
2014-11-15 20:37:22 -08:00
Eric House
2465017e46
add buttons that create new games, bypassing the NewGame activity for
...
a simpler experience.
2014-11-15 17:59:59 -08:00
Eric House
d848c17d03
use real strings rather than enum's toString() result in prefs UI
2014-11-14 07:53:12 -08:00
Eric House
e750811836
add relay and bt as default address types when there's no preference set
2014-11-14 07:32:27 -08:00
Eric House
76fe26a057
include the list of currently selected conn types as pref summary
2014-11-14 07:24:24 -08:00
Eric House
2e8f4097d9
remove unused widget
2014-11-14 07:23:54 -08:00
Eric House
15e380291b
snapshot: invite by BT now works well enough that moves can be
...
exchanged. Haven't checked whether the relay's also seeing traffic.
2014-11-14 07:12:03 -08:00
Eric House
1d1af9ffb3
fix some asserts: we have BT working now
2014-11-14 07:06:02 -08:00
Eric House
f625332782
add preference (dialog) to set default address types. Not used yet,
...
and still ugly.
2014-11-13 07:27:29 -08:00
Eric House
f2ecefd573
copy bt address info too
2014-11-13 07:27:03 -08:00
Eric House
74afdbd8b6
add more asserts
2014-11-12 06:52:58 -08:00
Eric House
c008f55133
add invite button only if I'm a host and am missing players
2014-11-12 06:52:40 -08:00
Eric House
0e2bbfc1ad
augment addresses even when message received is a duplicate. Now games
...
using (fake) SMS and relay work whichever of the address modes is
disabled during the game, on either side. At least for two-device
games.
2014-11-11 07:46:01 -08:00
Eric House
552ab8fa48
fix assertion (leaving the confusion in the code about tracking the
...
open relay socket)
2014-11-11 07:36:55 -08:00
Eric House
ba44863381
add simple tell() as wrapper on ask()
2014-11-11 07:35:56 -08:00
Eric House
10a960930c
collect number to be invited. (Not tested: whether a number other than 1 works)
2014-11-11 07:35:14 -08:00
Eric House
ba6151c385
remove param that causes assert to fire
2014-11-10 07:31:51 -08:00
Eric House
c704b7ff4f
remove dead code
2014-11-10 07:31:33 -08:00
Eric House
e82589a526
replace overloaded method with diff-named one, avoiding call to wrong
...
one when compiled on old 32-bit Atom. 32-bit issue, or what? This is
quick and sure to fix it. Should be grafted back to main branch.
2014-11-10 06:43:42 -08:00
Eric House
94cfaecfb1
replace overloaded method with diff-named one, avoiding call to wrong
...
one when compiled on old 32-bit Atom. 32-bit issue, or what? This is
quick and sure to fix it. Should be grafted back to main branch.
2014-11-08 23:07:34 -08:00
Eric House
c087824b47
snapshot with a bit of debugging added, mostly to tranfer to another machine
2014-11-07 20:26:02 -08:00
Eric House
786d775878
don't pass null address
2014-11-07 20:25:13 -08:00
Eric House
8e616095ad
add a bit more logging of channelNos
2014-11-06 20:28:51 -08:00
Eric House
70f4541bbe
Merge branch 'android_branch' into android_multi2
...
Conflicts:
xwords4/common/comms.c
2014-11-06 20:09:20 -08:00
Eric House
a34a859d18
log channelNo more consistently
2014-11-06 18:44:19 -08:00
Eric House
540d3e9622
wire disabling checkboxes into comms. They work -- and show that
...
multi-addressing needs debugging still.
2014-11-06 06:35:28 -08:00
Eric House
b1de8663d6
fix to compile with DEBUG undefined
2014-11-06 06:32:00 -08:00
Eric House
2426e04a70
fix overwriting of address info so that, AFAICT, both address types
...
are successfully being used through much of a test game.
2014-11-05 21:57:25 -08:00
Eric House
3d9ee4b9f9
use app define, not relay's
2014-11-05 21:45:14 -08:00
Eric House
68e7f303b0
oops -- here's the relay md5sum logging. app side went in prior.
2014-11-05 21:42:45 -08:00
Eric House
c516e1f77c
add code to log md5 sums of udp packets sent and received. These match
...
relaycon logging to be added shortly.
2014-11-05 21:42:03 -08:00
Eric House
405b3eef93
remove dead/commented out code
2014-11-05 21:33:54 -08:00
Eric House
564e671b47
quick hack to add checkboxes for turning off transport sends and
...
receives to be used for testing after it's actually hooked up. This
is just the UI.
2014-11-05 18:48:53 -08:00
Eric House
8aae7ae10a
fix crash: don't use comms before initialized
2014-11-05 07:49:17 -08:00