Git Product home page Git Product logo

Comments (6)

mickeyreiss avatar mickeyreiss commented on May 28, 2024

Hi @brendanw -

When the PayPal app is not installed, braintree_android is supposed to fall back to an in-app login experience. In other words, PayPal login should be available for all users, regardless of whether or not the PayPal app is installed on their device.

Can you take a look at which case your app is hitting in this scenario? Is there a problem starting the PayPalProfileSharingActivity (an internal class of the SDK)?

Can you provide any other details that might help us reproduce the issue? (e.g. Android API version and runtime version, how common is the issue?, etc.)

If you still need to detect whether or not One Touch (authentication in the PayPal app) is available, you might be able to use PayPalTouch.available, like we do internally, but that would go outside of our typically recommended integration style.

cc/ @braebot @lkorth

from braintree_android.

lkorth avatar lkorth commented on May 28, 2024

As @mickeyreiss said braintree_android will fall back to in-app login and there should be no need to check to see if the app is installed.

@brendanw do you depend on httpcore, httpclient or httpmime? We have seen conflicts that will cause the PayPal SDK to hang at the checking device activity.

Try to replace httpcore and httpclient with httpclient-android in the dependencies.

compile ('org.apache.httpcomponents:httpclient-android:4.3.5')
compile ('org.apache.httpcomponents:httpmime:4.3.6') {
    exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
}

from braintree_android.

brendanw avatar brendanw commented on May 28, 2024

Thanks @Ikorth that's helpful. We use the Foresee SDK which has that dependency and one other. I change our build.gradle and that resolved the spinner issue:

compile ('org.apache.httpcomponents:httpcomponents-client:4.2.2') {
    exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
}
compile ('org.apache.httpcomponents:httpclient-android:4.3.5')
compile ('org.apache.httpcomponents:httpmime:4.3.6') {
    exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
}

I am not sure what the root cause of the issue is. Does the Braintree SDK use the apache library? If so, I am curious why it is chosen over the standard android http client. We dislike it when 3rd party libraries use dependencies that are not absolutely 100% necessary as it increases the chances that we'll have collisions, slows down our build time w/ proguard, and bloats our code base.

from braintree_android.

braebot avatar braebot commented on May 28, 2024

More details are provided in the PayPal Android SDK Readme.

from braintree_android.

lkorth avatar lkorth commented on May 28, 2024

@brendanw glad to hear that fixed your problem.

If you check our build.gradle file you'll find the only dependency we have is Gson. The PayPal Android SDK is also included so merchants can use PayPal. The PayPal SDK does compile in a few dependencies that have conflicts with httpcore/httpclient. In the future this will not be an issue as we move away from using the standard PayPal Android SDK.

from braintree_android.

adneerav avatar adneerav commented on May 28, 2024

@braebot

I have added conflict dependency for paypal same like given in documentation (Read ME)
Like below mentioned.

compile ('org.apache.httpcomponents:httpclient-android:4.3.5')
compile ('org.apache.httpcomponents:httpmime:4.3.6') {
    exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
}

But still its getting Stuck with message Checking this device in 4.1.1 devices where in 5.0 & above its working.

  • targetSdkVersion 18
  • compileSdkVersion 23
  • buildToolsVersion '23.0.1'
  • classpath 'com.android.tools.build:gradle:1.5.0'
  • useLibrary 'org.apache.http.legacy'

PayPal SDK : PayPal-Android-SDK 2.13.1

compile 'com.paypal.sdk:paypal-android-sdk:2.13.1'

logcat

02-15 15:26:32.646 19404-19404/com.configureit W/paypal.sdk: PayPalService created. API:16 PayPalSDK/PayPal-Android-SDK 2.13.1 (Android 4.1.1; Genymotion Google Nexus 4 - 4.1.1 - API 16 - 768x1280; )
02-15 15:26:32.678 19404-19404/com.configureit W/paypal.sdk: clearing user data
02-15 15:26:32.702 19404-19404/com.configureit D/dalvikvm: GC_FOR_ALLOC freed 1535K, 9% free 25778K/28103K, paused 14ms, total 15ms
02-15 15:26:32.702 19404-19404/com.configureit I/dalvikvm-heap: Grow heap (frag case) to 25.956MB for 330012-byte allocation
02-15 15:26:32.722 19404-26084/com.configureit D/dalvikvm: GC_FOR_ALLOC freed 440K, 10% free 25660K/28487K, paused 21ms, total 21ms
02-15 15:26:32.794 19404-19404/com.configureit W/EGL_genymotion: eglSurfaceAttrib not implemented
02-15 15:26:32.810 19404-19404/com.configureit D/OpenGLRenderer: TextureCache::get: create texture(0xb91189c8): name, size, mSize = 16904, 9216, 10193820
02-15 15:26:32.814 19404-19404/com.configureit D/OpenGLRenderer: TextureCache::get: create texture(0xb9119bb8): name, size, mSize = 16905, 330000, 10523820
02-15 15:26:32.838 19404-19404/com.configureit D/OpenGLRenderer: TextureCache::callback: name, removed size, mSize = 1638, 9216, 10514604
02-15 15:26:32.838 19404-19404/com.configureit D/OpenGLRenderer: TextureCache::callback: name, removed size, mSize = 1639, 330000, 10184604
02-15 15:26:32.894 19404-19407/com.configureit D/dalvikvm: GC_CONCURRENT freed 1861K, 10% free 25721K/28487K, paused 0ms+1ms, total 16ms
02-15 15:26:32.894 19404-19404/com.configureit D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 7ms
02-15 15:26:32.902 19404-19404/com.configureit W/paypal.sdk: active service user data cleared
02-15 15:26:33.858 19404-26086/com.configureit W/paypal.sdk: fv SN:9 PayPal Debug-ID: 12d46460c02c5 [sandbox, 2.13.1;release]
02-15 15:26:37.470 19404-19404/com.configureit I/Choreographer: Skipped 54 frames!  The application may be doing too much work on its main thread.

Please help me for this issue.

from braintree_android.

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.