rest - How to implement android RESTful client with Robospice (or something like this) + OAuth? -


how implement robospice (or this) + oauth?

maybe can share link examples of practices creating restful android clients? can't figure architecture of restful app oauth, cover problems activity's lifecycle. of course know virgil dobjanschi "google i/o 2010 - android rest client applications". libraries robospice easy implement. if app uses oauth authorization service? libraries oauth useful? store access token? how execute requests synchronously? etc. ...

i looking complete code examples or @ least advices design , architecture.

it depends. talking oauth 1 or oauth 2? former, use signpost. latter, use robospice + google http client + google oauth client library.

if use google http client network library, need create own httpclientspiceservice based on googlehttpclientspiceservice, can find in robospice. then, need this:

public static httprequestfactory createrequestfactory() {     httptransport httptransport = androidhttp.newcompatibletransport();     return httptransport.createrequestfactory(new httprequestinitializer() {         @override         public void initialize(httprequest request) {             // todo: authorize or sign request...             // note authorize/sign requests make,             // want improve on that.         }     }); } 

the rest you, basics implement way provide third-party log-in, required token , set oauth library of choice.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -