from my tests the registration url of the server was needed (and not the root url) e.g.
http://<server>/ag-push/rest/registry/device

I think the var can be renamed to reflect that, it may cause confusion

(btw, in IOS the user puts the root URL of the server and we append the registration part, should we do the same here?)
https://github.com/aerogear/aerogear-push-ios-registration/blob/master/push-sdk/AGDeviceRegistration.m#L84