Commit Graph

27 Commits

Author SHA1 Message Date
Sebastian Kaspari e378c6570b Update all broadcast sending to use LocalBroadcastManager.
This breaks a lot as the receiving part is not changed yet. But this is
a branch anyways ... so let's break stuff!
2013-02-06 23:14:59 +01:00
Sebastian Kaspari 48b12bff40 Update copyright line (2009-2013). 2013-01-21 21:32:43 +01:00
Sebastian Kaspari 35a8d93cd0 IRCService: Extracting constants and reordering class members. 2012-10-04 19:15:18 +02:00
Daniel E. Moctezuma 89ff98b93d Added support for LED light notification on nickname highlight 2012-10-04 19:15:18 +02:00
Sebastian Kaspari 21032950b7 Update copright line (2009-2012). 2012-01-21 23:12:55 +01:00
Sebastian Kaspari fbdebc2ca5 Add ActionBarSherlock to all activities. Restructure menu items. Fixes #96. 2012-01-21 23:07:44 +01:00
Sebastian Kaspari 46a45523a8 IRCService: Use reflection to call setForeground() on old versions. 2012-01-21 12:59:02 +01:00
Steven Luo fafbe1ca4a Display "Not connected" in notification instead of no text when not connected 2011-08-16 11:21:33 +02:00
Sebastian Kaspari a357c42477 IRCService: suppress rawtype warning 2011-07-17 14:40:19 +02:00
Steven Luo bce2523f98 Fix auto-reconnect
The current auto-reconnection implementation will only try reconnecting
once, immediately after the server is disconnected.  This will of course
almost always fail if the network is down or otherwise unavailable, so
as it stands, enabling auto-reconnect isn't particularly useful.

This patch implements multiple retries for auto-reconnect, with the
frequency of retries controlled by a preference.  The Android alarm
infrastructure is used to schedule reconnection attempts; if the phone
misses a scheduled attempt while it's asleep, the reconnection will be
attempted the next time the phone wakes up.
2011-06-29 20:34:55 +02:00
Steven Luo e7651315df Make reconnections actually work
At the moment, the reconnect feature is somewhat glitchy, popping up
multiple reconnect prompts even if a reconnection succeeds, and
occasionally causing crashes.  A successful reconnection results in the
conversation history being cleared, which is an annoying outcome when
connected over an unreliable network.

This patch does the following:

* Keep track of whether a reconnect dialog is active, to prevent
  multiple dialogs from opening.
* Introduce a new field to the Server object, mayReconnect, which is
  used to keep track of whether a reconnection should be attempted in
  the event of a disconnection.  It's set to "true" when we connect to a
  server, and "false" if the user asks for a disconnection.
* Prevent the clearing of active conversations and conversation history
  on disconnect, unless the user specifically asked for the disconnect.
* Keep the IRCService running even when no servers are connected, unless
  the user has disconnected from all servers herself.  This is needed
  for reliable auto-reconnects (see next patch), but has the side effect
  of keeping conversation history around even if the activity isn't open
  when a disconnect happens.
2011-06-29 20:34:52 +02:00
Sebastian Kaspari 2f19eb8032 (Authentication) Implementation of authentication via SASL on connect 2011-06-10 22:03:19 +02:00
Sebastian Kaspari 14ed6f7f2b IRCService: Code cleanup and suppress warnings 2011-06-08 23:17:31 +02:00
Steven Luo 06e0849c17 Bugfix notification system
* If there's a new message notification, keep showing the "New messages
   in" content text, even after a disconnect notification.
 * Handle the case of a channel/query name duplicated between two or more
   connections more gracefully in new message notifications
 * Fix a race in updating notifications
2011-06-08 23:11:28 +02:00
Steven Luo 61960c9add Overhaul notifications system
Features:
* Now displays the number of mentions that the user has not seen in the
  notification.
* When no mentions are outstanding, display which servers the user is
  connected to, not the last message.
* When more than one mention is outstanding, display the names of the
  conversations with new mentions, not just the last message received.
* Notifications of mentions are suppressed if you're in the conversation
  at the time of the mention.
* Notifications of mentions automatically clear when you bring up the
  conversation.
* Vibrate notifications now generate the user's chosen default vibrate
  pattern, not a hard-coded one.
* Add ticker text to the notification that's displayed when the IRCService
  goes into the foreground, instead of displaying a blank ticker.

To allow for all of this, the implementation moves most of the details
of generating the notification text into the IRCService, which now
exposes addNewMention() and notifyConnected()/notifyDisconnected()
methods instead of the lower-level updateNotification().
2011-06-08 23:11:28 +02:00
Steven Luo ae1b574997 Dispose of IRCConnections properly to avoid leaking IRCService objects
Each IRCConnection starts an input thread and an output thread when
created; if not stopped, these threads continue to hold the IRCService,
resulting in a leak when the service is stopped.  Fix this by using
PircBot's dispose() to stop the threads when disposing of the
IRCConnection.
2011-06-08 23:11:28 +02:00
Steven Luo 464430ee74 Add FLAG_ACTIVITY_NEW_TASK to notification intents
According to
http://developer.android.com/reference/android/app/Notification.html#contentIntent
we should do this.  Suppresses a log message when tapping on our status
bar notification.
2011-06-08 23:11:27 +02:00
Sebastian Kaspari d8b1a0218f Added 2011 to licence header 2011-02-05 13:00:12 +01:00
Sebastian Kaspari feaf1d4aea Fix sound notification 2011-01-15 23:38:56 +01:00
Sebastian Kaspari e014165a17 New setting: Play (notification) sound on highlight 2010-12-17 22:29:33 +01:00
Sebastian Kaspari 4b3e47c799 Set vibration pattern (default does not always work) 2010-12-17 22:19:36 +01:00
Sebastian Kaspari 02b7ec1741 Replace all tabs with four spaces! 2010-11-18 18:52:19 +01:00
Sebastian Kaspari f3f195f631 IRCService: Added javadoc 2010-11-18 18:47:12 +01:00
Sebastian Kaspari ce0650d711 IRCService: Fixed a NullPointerException 2010-11-18 18:43:37 +01:00
Sebastian Kaspari 6d2a6bff14 IRCService: imports 2010-11-18 18:33:22 +01:00
liato 81f2c94b87 Added setting to vibrate on highlight. 2010-11-17 01:32:09 +01:00
Sebastian Kaspari 1250c10d9c Merged application and test project into one repository 2010-11-07 08:35:45 +01:00