android-checkout-sdk icon indicating copy to clipboard operation
android-checkout-sdk copied to clipboard

PayPal auth SDK uses common resource names

Open smuldr opened this issue 2 years ago • 1 comments

Describe the bug When our app adds a dependency on the PayPalPartnerAuth artifact then our app's name is changed to "AuthCore". We were playing around with the PayPal Native Checkout when we noticed that our app was suddenly renamed. It turns out that we use Android Studio's default app_name string resource for our app, which was overwritten by the PayPal library due to the magic of dependency resolution in Gradle.

To Reproduce Steps to reproduce the behavior:

  1. Create a fresh Android project in Android Studio and name is "My App"
  2. Add dependency on PayPalPartnerAuth library: 'com.paypal.android:PayPalPartnerAuth:1.7.5'
  3. Launch the app
  4. See "AuthCore" as app name

Note that the app_name not is not always overwritten: there seems to be an unlucky glitch in our multi-module Gradle architecture where the string resources are kept in a separate module and the checkout code is in another module. This makes it difficult to share a simple reproduction project.

Expected behavior

  1. The PayPal library should not to include an app name in its resources.
  2. The PayPal library should prefix its resources to avoid collisions with app resources, e.g. paypal_app_name.

Screenshots CleanShot 2023-01-16 at 16 16 00@2x

Smartphone (please complete the following information):

  • Android Version: Any
  • Device: Any
  • SDK Version 1.7.5

smuldr avatar Jan 16 '23 15:01 smuldr

Hi @smuldr - Thanks for calling this out. We'll notify the internal team who owns this dependency.

tdchow avatar Mar 15 '23 15:03 tdchow