Inserted the Registration activity into initial setup flow.

1) Added push messaging toggle to preferences.

2) Added push messaging registration screen to setup flow.

3) Migrated rest of SharedPreferences accessors to
   TextSecurePreferences.
This commit is contained in:
Moxie Marlinspike
2013-07-11 14:58:40 -07:00
parent 52e5274a2f
commit d7070e7ecf
22 changed files with 427 additions and 141 deletions

View File

@@ -65,9 +65,8 @@ public class PushServiceSocket {
makeRequest(REGISTER_GCM_PATH, "PUT", new Gson().toJson(registration));
}
public void unregisterGcmId(String gcmRegistrationId) throws IOException, RateLimitException {
GcmRegistrationId registration = new GcmRegistrationId(gcmRegistrationId);
makeRequest(REGISTER_GCM_PATH, "DELETE", new Gson().toJson(registration));
public void unregisterGcmId() throws IOException, RateLimitException {
makeRequest(REGISTER_GCM_PATH, "DELETE", null);
}
public void sendMessage(String recipient, String messageText)