Commit graph

5710 commits

Author SHA1 Message Date
Eric House
5e20e54638 try to speed up delivery when udp not working
Having reconfigured to use non-existent relay port as a test of falling
back to the web apis, tweak stuff: send the packets that have been
accumulated when an EOQ is found (rather than dropping all of them
immediately) before exiting the write thread; and start the threads up
when posting a packet in case they aren't (they may not be when the post
happens via timer firing.)
2017-12-27 15:03:28 -08:00
Eric House
9fd4a90ccd use currentTimeMillis() for time
Everybody else does....
2017-12-27 14:43:25 -08:00
Eric House
17f27a1b65 remove relayStatus() from jni
Making it a no-op as the only thing it did, tweaking the net status
indicator, isn't useful.
2017-12-27 14:42:15 -08:00
Eric House
de691af7ca oops: save outgoing UDP acks, not web ones
Incorrect ! meant that outbound ACKs were saved for web sends rather
than UDP and so couldn't be resent in the case where fallback to web was
needed.
2017-12-27 12:30:02 -08:00
Eric House
10df914897 ignore folders and generated file 2017-12-22 08:02:49 -08:00
Eric House
7099a7627a wip: toward being able to resend ACKs again 2017-12-21 21:22:40 -08:00
Eric House
d134077d87 move ack timer off of ui thread
Seemed to be causing ANRs. Integrate instead into outgoing message queue
by using poll(timeout) then checking for unack'd packets every time
through the loop (but not more than once/3 seconds or so.)
2017-12-21 21:22:40 -08:00
Eric House
8d9889ccc4 cleanup, e.g. use label to exit outer loop 2017-12-19 07:30:31 -08:00
Eric House
ed57a744b6 use the new built-in game_receiveMessage
I'd forgotten it...
2017-12-19 07:28:19 -08:00
Eric House
16dc1b15bd update release strings and changelog 2017-12-18 22:45:45 -08:00
Eric House
5772718537 mark packets with udp-sent time
Presence of timestamp instead of a boolean determines whether packet
should next via Web. Timestamps might also allow to process a larger
number of unacked packets in a single timer fire....
2017-12-18 18:58:19 -08:00
Eric House
2339f09557 start skipping UDP when acks aren't coming
Track ack'd and unack'd packets. When there are ten more of the latter,
skip the UDP-send step. This is probably not the algorithm I'll settle
on (an explicit PING to the relay over UDP might be simpler), but it's
simple and easy.
2017-12-18 18:13:04 -08:00
Eric House
ec698c4c62 remove empty strings (currently an error) 2017-12-17 11:17:23 -08:00
Eric House
de8993c2e5 Merge branch 'android_translate' into android_branch 2017-12-17 11:13:32 -08:00
Eric House
771c9ba4a6 add three navbar icons from The Noun Project
with attribution of course.
2017-12-17 11:07:43 -08:00
Eric House
dc964ea6c1 catch up small-board menu 2017-12-16 08:17:15 -08:00
Eric House
39dbe67929 add archive menuitem
As with Rematch, you should have the option once you've dismissed the
special alert that comes up when finished games are opened.
2017-12-16 08:06:20 -08:00
Eric House
da1c3f992a Merge branch 'android_branch' into relay_via_http 2017-12-15 07:20:53 -08:00
Eric House
b0befa62e3 remove logging 2017-12-15 07:17:14 -08:00
Eric House
2db67ed339 try send via udp, then web
Send each packet via UDP if that's thought to be working (always is,
now) and start a 10-second timer. If it hasn't been ack'd by then,
resend via Web API. Tested by configuring to use a UDP socket that the
relay isn't listening on. Only problem is that the backoff timers are
broken: never stops sending every few seconds.
2017-12-15 07:12:14 -08:00
Eric House
c7a635285c change text and names around native-vs-web choice
The plan's to use the native relay protocol first, then to fall back to
the slower but more reliable (esp. on paranoid/block-everything wifi
networks) webAPI. This is the name change without behavior
change (except that the native kill() to report deleted games is gone.)
2017-12-14 06:47:03 -08:00
Eric House
e96a982f24 get rid of moved file already 2017-12-12 06:59:31 -08:00
Bernard Massot
70aeef6c8e Translated using Weblate (French)
Currently translated at 99.1% (737 of 743 strings)
2017-12-11 17:46:23 +01:00
Eric House
4746f153e3 add assertion
Need to revisit that join() call; this'll help.
2017-12-11 06:56:53 -08:00
Eric House
4fa8079bf0 log outgoing "post" params json 2017-12-11 06:55:25 -08:00
Eric House
d1a5a94740 fix crash processing multiple packets
When grouping to allow multiple packets per outbound API call I forgot
that some are there to mark the end-of-queue: can't be sent! Trying
caused a NPE. Now if any EOQ is found in the queue that batch is dropped
and the thread's exited.
2017-12-11 06:42:35 -08:00
Eric House
701e6968de file to pull an apk
app-id is hardcoded for now.
2017-12-10 11:56:52 -08:00
Weblate
6ffd4d4a37 Merge remote-tracking branch 'origin/android_translate' into android_translate 2017-12-01 04:25:46 +01:00
Eric House
4b81b784fc Merge branch 'android_branch' into relay_via_http 2017-11-28 06:24:09 -08:00
Eric House
8e37551f8a up changelog for new release 2017-11-27 20:40:16 -08:00
Eric House
455373343a remove requirement for gcm.jar
remove from xw4d version too since it can't work anyway.
2017-11-27 20:40:16 -08:00
Eric House
af81342021 create new fdroid variant 2017-11-27 20:40:06 -08:00
Eric House
503702c0e4 log unack'd packets 2017-11-26 20:56:38 -08:00
Eric House
0d8aef06f3 keep packets until ack'd for retry and better logging 2017-11-26 20:11:25 -08:00
Allan Nordhøy
9572cdca1b Translated using Weblate (Norwegian Bokmål)
Currently translated at 55.6% (411 of 738 strings)
2017-11-26 15:49:40 +01:00
Eric House
58eafd5fd1 fix glitches in XML strings for Norwegian 2017-11-20 22:04:42 -08:00
Eric House
3216ef8a5c Merge branch 'android_branch' into android_translate 2017-11-20 06:53:34 -08:00
Eric House
b6124ca2d1 change version strings and changelog 2017-11-19 20:10:54 -08:00
Eric House
4698c0e54b add not-again explanation for new archive feature 2017-11-19 20:00:45 -08:00
Allan Nordhøy
e6a1aef7a2 Translated using Weblate (Norwegian Bokmål)
Currently translated at 11.6% (86 of 738 strings)
2017-11-14 06:48:41 +01:00
Eric House
2879055ca9 log url when response code isn't 200 2017-11-13 08:17:26 -08:00
Eric House
5166933be6 Merge branch 'android_branch' into relay_via_http 2017-11-13 07:27:17 -08:00
Eric House
607567cd35 don't allow duplicate group names
If group already exists, warn rather than create another with the same
name.
2017-11-12 22:50:45 -08:00
Eric House
c2eff7d3f2 add "archive" option to dialog on opening done game
Create the group if needed. Name's not user-editable at this
point. Should be a preference, and that preference should be changed if
user renames it.
2017-11-12 22:31:48 -08:00
Eric House
35d172225f Use AtomicInteger rather than synchronization 2017-11-12 20:10:51 -08:00
Eric House
373c0249bc start backoff timer at 5 second, not 30.
Makes the http case nearly as quick as the udp one when both games are
on the same device. Which is all I've tested so far.
2017-11-12 20:04:22 -08:00
Eric House
8650795a81 don't crash when can't reach relay via http 2017-11-12 08:53:19 -08:00
Eric House
057728c287 make gtk include an invite ID in rematch invitations
otherwise Android refuses to accept the second "" it receives.
2017-11-11 16:39:09 -08:00
Eric House
fa52c5091a fix tap down lower not opening game
Making the right_side elem match its parent height prevents the
lower-right region of game list items from falling through and
triggering a toggle-selection event.
2017-11-11 15:45:00 -08:00
Eric House
39deeeb089 fix tap down lower not opening game
Making the right_side elem match its parent height prevents the
lower-right region of game list items from falling through and
triggering a toggle-selection event.
2017-11-11 15:43:07 -08:00