Coder Social home page Coder Social logo

OAuthConsumer about droid-fu HOT 9 CLOSED

mttkay avatar mttkay commented on June 18, 2024
OAuthConsumer

from droid-fu.

Comments (9)

Antek avatar Antek commented on June 18, 2024

Too complete this issue. I've excluded the main/test/main.java from my build path, because it was missing, then I got a new error in BetterHttpRequest that OAthConsumer object is missing.

from droid-fu.

mttkay avatar mttkay commented on June 18, 2024

Hi,

you need the Android JAR as an artifact in your local Maven repository. Unfortunately, Google does not seem to be willing to add the Android JARs to Maven Central, so you have to install it manually (that's pretty easy though).

Instructions here:
http://code.google.com/p/maven-android-plugin/wiki/GettingStarted

PS: everything should be fine after doing that. don't do stuff like deleting tests... that will most certainly break the build.

from droid-fu.

mttkay avatar mttkay commented on June 18, 2024

Did you manage to get it working? Here's the step-by-step instructions (the maven-android-sdk-deployer is brand new, hadn't worked with it before myself):

  1. Update Droid-Fu to the latest version (I just committed a change which affects the build process)
  2. download the maven-android SDK deployer from http://github.com/mosabua/maven-android-sdk-deployer/archives/master
  3. OR -
    git clone git://github.com/mosabua/maven-android-sdk-deployer.git
  4. go to the folder where you cloned/unzipped the archive
  5. go to platforms/android-1.5 directory
  6. do $mvn install -Dandroid.sdk.path=/path/to/your/android/sdk
  7. go to the folder where you cloned/unzipped droid-fu
  8. do $mvn install -DcopyTo=/path/to/your/apps/lib/folder

that should do the job.

from droid-fu.

mttkay avatar mttkay commented on June 18, 2024

if you still have problems... I just uploaded a recent build to the downloads section --> http://github.com/kaeppler/droid-fu/downloads

but keep in mind that I will only occasionally update that file. syncing with master is your best bet ATM, since this library is still in early development.

from droid-fu.

matt-lethargic avatar matt-lethargic commented on June 18, 2024

Hi is this project dead now? I'd like to be able to keep transparent file transparent. If this isn't going to happen or if this project is dead I'd like to know now so I can find a different solution. Thanks
Matt

from droid-fu.

mttkay avatar mttkay commented on June 18, 2024

it's not dead, just on hold. I have been busy with other projects lately, but I'll get back to it as part of Qype's next iteration on Qype for Android.

from droid-fu.

matt-lethargic avatar matt-lethargic commented on June 18, 2024

Oh cool. Right I have an on thread question. I've followed the process above and created the file droid-fu-1.0-SNAPSHOT.jar in my lib folder. Since that I've changed the code slightly in an attempt to be able to set the scaleType of the image. I've create a public method call setScaleType and run the above command (8) again. In Eclipse I've tried using that method in my code but it doesn't appear in the autocomplete and won't compile.

I also expanded the "Referenced Libraries" folder in the package explorer and expanded down to the WebImageView.class and the method is listed there.

Any ideas what I'm doing wrong or steps i've missed out?!

Thanks
Matt

from droid-fu.

matt-lethargic avatar matt-lethargic commented on June 18, 2024

ignore me.... it worked :/

from droid-fu.

mttkay avatar mttkay commented on June 18, 2024

FYI: droid-fu is now completely decoupled from signpost. The signed() method has been removed. Please use an HttpClient RequestInterceptor to sign requests from now on, e.g.:

public class OAuthRequestInterceptor implements HttpRequestInterceptor {

public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
    try {
        if (request instanceof RequestWrapper) {
            RequestWrapper wrapper = (RequestWrapper) request;
            HttpUriRequest uriRequest = (HttpUriRequest) wrapper.getOriginal();

            // remove any existing Auth header, since this may be invoked as part of a
            // request-retry cycle
            uriRequest.removeHeaders(OAuth.HTTP_AUTHORIZATION_HEADER);

            // sign the original request (Signpost needs the URL, so the wrapper is not enough)
            OAuthSystem.getConsumer().sign(uriRequest);

            // copy the header over to the wrapper
            Header authHeader = uriRequest.getHeaders(OAuth.HTTP_AUTHORIZATION_HEADER)[0];
            request.setHeader(authHeader);

            // Log.d("BetterHttp/OAuth " + System.currentTimeMillis(), "signing request as "
            // + authHeader.getValue());
        }
    } catch (Exception e) {
        throw new HttpException("OAuth request interceptor failed", e);
    }
}

}

from droid-fu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.