Git Product home page Git Product logo

spring-android-samples's Introduction

spring-android-samples is no longer actively maintained by VMware, Inc.

spring-android-samples's People

Contributors

pyricau avatar royclarkson avatar samitny avatar simonmartinecon avatar spring-operator avatar trevormarshall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-android-samples's Issues

Failed resolution of HttpClientContext

Hi guys,

I'm working on integrating an API in an Android application and I want to use the framework provided by Spring for Android/Spring Social to do so.

I used the spring-android-twitter-client as an example to get my things up and running. The problem is that the my application must be able to get an access token based on the consumer key and consumer secret with a grant_type=client_credentials (http://tools.ietf.org/html/rfc6749#section-4.4).

This feature is available in the newest version of the spring-social-core (1.0.0.RELEASE) but it's not in the version used in the Twitter guide. So I did what I add to do and updated my application dependencies but I ran in a problem.

The newest version of the spring-social-core uses new features from the org.apache.httpclient librairies. I reproduced the error in your Twitter sample simply by updating the dependencies, When I run the application and try to connect to my account, I get the following runtime error:

01-13 14:33:27.941  24112-24178/org.springframework.android.twitterclient E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1
    Process: org.springframework.android.twitterclient, PID: 24112
    java.lang.RuntimeException: An error occured while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:300)
            at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
            at java.util.concurrent.FutureTask.run(FutureTask.java:242)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/protocol/HttpClientContext;
            at org.springframework.social.support.ClientHttpRequestFactorySelector$HttpComponentsClientRequestFactoryCreator$1.createHttpContext(ClientHttpRequestFactorySelector.java:80)
            at org.springframework.http.client.HttpComponentsClientHttpRequestFactory.createRequest(HttpComponentsClientHttpRequestFactory.java:133)
            at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:84)
            at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:472)
            at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:453)
            at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:429)
            at org.springframework.social.oauth1.OAuth1Template.exchangeForToken(OAuth1Template.java:187)
            at org.springframework.social.oauth1.OAuth1Template.fetchRequestToken(OAuth1Template.java:115)
            at org.springframework.android.twitterclient.TwitterWebOAuthActivity$TwitterPreConnectTask.doInBackground(TwitterWebOAuthActivity.java:136)
            at org.springframework.android.twitterclient.TwitterWebOAuthActivity$TwitterPreConnectTask.doInBackground(TwitterWebOAuthActivity.java:126)
            at android.os.AsyncTask$2.call(AsyncTask.java:288)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.client.protocol.HttpClientContext" on path: DexPathList[[zip file "/data/app/org.springframework.android.twitterclient-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
            at org.springframework.social.support.ClientHttpRequestFactorySelector$HttpComponentsClientRequestFactoryCreator$1.createHttpContext(ClientHttpRequestFactorySelector.java:80)
            at org.springframework.http.client.HttpComponentsClientHttpRequestFactory.createRequest(HttpComponentsClientHttpRequestFactory.java:133)
            at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:84)
            at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:472)
            at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:453)
            at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:429)
            at org.springframework.social.oauth1.OAuth1Template.exchangeForToken(OAuth1Template.java:187)
            at org.springframework.social.oauth1.OAuth1Template.fetchRequestToken(OAuth1Template.java:115)
            at org.springframework.android.twitterclient.TwitterWebOAuthActivity$TwitterPreConnectTask.doInBackground(TwitterWebOAuthActivity.java:136)
            at org.springframework.android.twitterclient.TwitterWebOAuthActivity$TwitterPreConnectTask.doInBackground(TwitterWebOAuthActivity.java:126)
            at android.os.AsyncTask$2.call(AsyncTask.java:288)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
    Suppressed: java.lang.ClassNotFoundException: org.apache.http.client.protocol.HttpClientContext
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
            ... 17 more
     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

The problem seems to be caused by the httpclient version that is shipped with Android which is older than the one required. If I try to add the dependencies of the HttpClient port for Android in my build, Gradle seems to exclude it to avoid conflict.

I'm on Linux, I use Android Studio 1.0.1 and I open Android projects with Gradle. What can be done?

Need Twitter spring library update

Spring social-twitter dependency version need update to 1.0.5.RELEASE to accommodate twitter API 1.1 release

            <dependency>
        <groupId>org.springframework.social</groupId>
        <artifactId>spring-social-twitter</artifactId>
        <version>1.0.5.RELEASE </version>
        <exclusions>
            <!-- Provided by Android -->
            <exclusion>
                <artifactId>commons-logging</artifactId>
                <groupId>commons-logging</groupId>
            </exclusion>
        </exclusions>

    </dependency>

twitter example works fine following this update.

spring-android-showcase client mvn package failed

failure information:
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:andr
oid-maven-plugin:3.9.0-rc.1:apk (default-apk) on project spring-android-showcase
-client: Error while processing transient dependencies: Failed to collect depend
encies at org.springframework.android:spring-android-rest-template:jar:2.0.0.M1
-> com.google.code.android-rome-feed-reader:android-rome-feed-reader:jar:1.0.0-r
2: Failed to read artifact descriptor for com.google.code.android-rome-feed-read
er:android-rome-feed-reader:jar:1.0.0-r2: Could not transfer artifact com.google
.code.android-rome-feed-reader:android-rome-feed-reader:pom:1.0.0-r2 from/to cen
tral (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorExc
eption: PKIX path building failed: sun.security.provider.certpath.SunCertPathBui
lderException: unable to find valid certification path to requested target -> [H
elp 1]

my maven environment:
Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-12T04:58:1
0+08:00)
Maven home: C:\tools\apache-maven-3.2.3\bin..
Java version: 1.7.0_21, vendor: Oracle Corporation
Java home: D:\Program Files\Java\jdk1.7.0_21\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Twitter Callback URL

First, thanks and congratulations for the project!

I'm trying to connect using an application created on my Twitter, but when the fetch request for the token is done my application opens the browser with the authentication token generated:

emulator

This because I had to register a valid URL in the "Callback URL" field. I saw that you registered the value "x-android-org-springsource-twitterclient://twitter-oauth-response", but could not registering something that pattern...

Could you help me please?

MessageList class is missing

MessageList class is missing:

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project spring-android-showcase-server: Compiler errors :
[ERROR] error at public @ResponseBody MessageList fetchMessagesXml() {
[ERROR] ^^^^^^^^^
[ERROR] /spring-android-samples/spring-android-showcase/server/src/main/java/org/springframework/android/showcase/HomeController.java:194:0::0 MessageList cannot be resolved to a type
[ERROR] error at MessageList messageList = new MessageList(messages);
[ERROR] ^^^^^^^^
[ERROR] /spring-android-samples/spring-android-showcase/server/src/main/java/org/springframework/android/showcase/HomeController.java:197:0::0 MessageList cannot be resolved to a type
[ERROR] error at MessageList messageList = new MessageList(messages);
[ERROR] ^^^^^^^^
[ERROR] /spring-android-samples/spring-android-showcase/server/src/main/java/org/springframework/android/showcase/HomeController.java:197:0::0 MessageList cannot be resolved to a type

First bad commit is aa74759:

git bisect log 
git bisect start
# bad: [aa74759a83da81b8b6a179b0c24078920c5d0122] Updating dependencies
git bisect bad aa74759a83da81b8b6a179b0c24078920c5d0122
# good: [aa41c819206abdb77e290802c9882324cbdae2a6] Updated to Spring Social 1.0.0.RC2 and Jackson 1.8.4
git bisect good aa41c819206abdb77e290802c9882324cbdae2a6
# good: [aa41c819206abdb77e290802c9882324cbdae2a6] Updated to Spring Social 1.0.0.RC2 and Jackson 1.8.4
git bisect good aa41c819206abdb77e290802c9882324cbdae2a6
# good: [64dc2635a87a694d90311d8740d6e0d59884ea77] Updated to Jackson 1.8.4
git bisect good 64dc2635a87a694d90311d8740d6e0d59884ea77

Spring social twitter 1.1.0

Hi, would it be possible to update the twitter client example to use spring-social-twitter:1.1.0.RELEASE? I'm trying to update the version so I can use the 'getUnmodifiedText' method on Tweet, but I keep running in to dependency problems - it looks like the transitive dependencies for the latest version of spring-social-twitter are much more complex than they used to be, so I either end up with dex problems when spring-beans gets included, or if I fix that I get runtime exceptions for missing classes.

Thanks.

Facebook connection doesn't actually disconnect

After Facebook connection is disconnected, and the Connect option is shown, when the item option clicked, it automatically connect to Facebook without asking for user name and password, and to totally disconnect , we have to clear cache/data from app management.

It seems onPageStarted methed of FacebookOAuthWebViewClient class is called again and again until uriFragment is obtained. How can we disconnect totally?

facebook client issue

I noticed that if you specify the targetSDKversion in AndroidManifest.xml file higher than 15, facebook client example does not work. Login process fails. I haven't tested it by with targetSdkVersion below 15 since I need to use latest target in my project.

Seems some redirection issue with httpclient/RESTemplate in higher version of SDK.

Just in case,I am using
facebook social version = 1.0.3.RELEASE
maven-compiler-version = 3.1
targetSdkVersion in AndroidManifest.xml = 17

Created : https://jira.springsource.org/browse/ANDROID-134

STOMP over WebSockets API for Android equivalent to RestTemplate

Hello Mr. Clarckson,

First of all thank you very much for your invaluable contributions to the open source Spring/Android communities.

RestTemplate API for Android is extremely useful to develop client-server communications in the Android platform. It would be great to have an excellent guide as: http://spring.io/guides/gs/consuming-rest-android/ oriented to WebSockets technology (http://spring.io/guides/gs/messaging-stomp-websocket/) for Android. Does Spring Roadmap contemplates the development of an equivalent API for STOMP over WebSockets?

Thank you very much for your attention,

Warren de León Ofalla http://warrendeleon.com

Couldn't find some packages

Hi,

I have downloaded the Spring for Android 1.0.0.RC1 and I couldn't find the following packages:

  • org.springframework.social.connect.support
  • org.springframework.social.facebook.connect
  • org.springframework.social.twitter.api
  • org.springframework.social.twitter.connect

The packages that look similar that I have are:

  • org.springframework.social.connect.sqlite
  • org.springframework.social.connect.sqlite.support

Is this normal? Where can I find the rest?

Thanks!

Dependencies on spring-android

The dependencies on spring-android 1.0.0.BUILD-SNAPSHOT is at least not easily resolvable. Setting version to 1.0.0.M4 seem ok.

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.