Commits

Ian Eure  committed a5ba12d

Add unregister().

  • Participants
  • Parent commits 74a7306

Comments (0)

Files changed (1)

File src/main/java/urbanairship/UrbanAirshipClient.java

 				+ encode(identifier), 
 				dev);
 	}
+
+    public void unregister(Device dev)
+	{
+		String identifier = dev.getIdentifier();
+		String path = dev.getPath();
+
+		if ( (identifier == null) || (identifier.trim().length() == 0) )
+		{
+			throw new IllegalStateException("missing device identifier");
+		}
+
+		delete("/api/"
+                   + path
+                   + "/"
+                   + encode(identifier));
+	}
 	
 	public UserCredentials create(User u)
 	{