Do you need to use the REST API in this app? Usually people using that API are building PhoneGap apps, but it looks like you’re using native code, in which case the native API is the right choice.
Anyway, if you’re getting an error, it’s always a good idea to post the details of the error.