Android Tumblr API Using Sign Post

What’s up developers, today i will teach you how to add the Android tumblr api login using sign post in android application. I have been working on this for three days, i’ve google it and make some researches on stackoverflow and other websites, but i didn’t find any working example because Tumblr does not have any Native API like Facebook or Google Plus. Then i decided to create one. I have developed a small android tumblr api for tumbr login using sign post and jumbr apis and i would like to share it with you.

In the video below ,i have explained all steps for adding this library to a sample android application and how this library works. It is sample to use and i think you will not find any issues about it.

The sample application layout will contain a small Title , a Button Login which, when clicked, will open the Tumblr login form in a new Activity, and a TextView which  will display the name of the user logged in.

This is a screenshot of the application’s UI :

android tumblr api using sign post

Follow this video tutorial to see how this library works :

I have forgotten to add one step in the video tutorial above. This step is to add the activity declaration in the Manifest file . So go to the manifest file and open it and add the code below :

Links used in this tutorial :

Tumblr API v2 to create an application

OAuth SignPost JAR Files

Jumblr ( Tumblr For Java)

Download the Android Tumblr Api (Library and Demo)

android tumblr api using sign post

That’s it . I Hope that this small library will be helpfull for others who has the same issue.

If you have any questions or issues about the android tumblr api, don’t hesitate to add a comment or contact us via the contact form.

See you in the next tutorial :)



Last modified: October 3, 2014

11 thoughts on “Android Tumblr API Using Sign Post

  1. Jimmy

    Just want to say thanks for this Library. Simplified things a LOT!

    Just one thing: I had to remove the jumblr-0.0.8-jar-with-dependencies and add each one individually into the Library project because i’m using another library that uses the gson jar. So I kept getting this error:
    Dex Loader Unable to execute dex : Multiple dex files define Lcom/google/gson/JsonSerializer;

    Once I did this everything started working as expected. In any case you may want to make a note somewhere that this may be a problem, or provide an alternative jar that does not contain the gson jar.

    Thanks again!

    Reply
    1. houcine_developer Post author

      Hello Jimmy,
      You’re welcome.

      You are right about the dependencies, if you are using just the gson.jar library , you can remove it and add the jumbler-with-dependencies.jar as one library , otherwhise, you can use the jumbler.jar library which doesn’t contain any dependencies (like your case).

      Thanks for the remark.
      Regards,
      Houcine

      Reply
      1. Kanth

        thanks for this Library..

        Here i am getting an error java.lang.NoClassDefFoundError: org.scribe.builder.ServiceBuilder. here i haven’t used jumbler-with-dependencies.jar.i used jumbler.jar.

        For this problem please provide an alternative solution..

        Thanks ..

        Reply
          1. Kanth

            thanks for the reply.

            Here i am using Facebook and simpl3r libraries. when i am adding these libraries to the project. these libraries comes under android dependencies. when i execute then i get this error:
            Dex Loader Unable to execute dex : Multiple dex files define Lcom/google/gson/JsonSerializer

            so that i used jumblr jar without dependencies.

  2. Siva

    Thanks for this library.

    but i am getting problem with this one. here i am using third party jasr too. i considered above reply and tried jumblr jar without dependencies.So i getting this Error: java.lang.NoClassDefFoundError: org.scribe.builder.api.TumblrApi.

    i am getting dialog also in webview. when i click the “allow” then i’m getting the message in logact “Tumblr Login Failed”. but in “mainactivity” its displaying username.

    i tried to findout solution for this. and till i spend too much time for this problem but i can’t find any solution. so please provide alternative solution for this problem.

    Thanks in advance.
    Thanks

    Reply
    1. houcine_developer Post author

      Hi Kanth,

      Can you tell me what are the libraries that you have in your project ? and why you are not using jumblr-with-dependencies? ( i recommand using jumblr-with-dependencies.jar library, and if you have the gson.jar lib in your project , just delete it because it is already added in the dependencies of jumblr-with-dependencies.jar lib)

      Otherwise, i advise you to take a look at this thread : http://stackoverflow.com/questions/8678630/noclassdeffounderror-for-code-in-an-java-library-on-android/12702315#12702315.

      Regards,

      Reply
      1. siva

        Thanks for reply.

        In my project i am using viewpager and facebooksdk libraries. and i am not using gson.jar but when i am using jumblr with dependencies then i get the error : Unable to execute dex: Multiple dex files defineorg /apache/commons/codec/decoder

        if i use jumblr jar instead of jumblr with dependencies then its executed but i am getting “Login Failed” message in console with that i kept getting this error : Could not find class ‘org.scribe.builder.api.TumblrApi’, referenced from method com.tumblr.jumblr.request.RequestBuilder.setConsumer

        so, please provide solution for this.
        sorry for inconvenience.

        Thanks again

        Reply
        1. houcine_developer Post author

          can you send me the sample android project that contains your code and i will try to fix the problem you got.

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">