paypal / paypal-here-sdk-android-distribution

Add credit card (swipe & key-in) capabilities to your Android app
Other
84 stars 95 forks source link

Google Play Services Location Permission #147

Closed vanceanderson41 closed 5 years ago

vanceanderson41 commented 5 years ago

In the sample app, this is included as a dependency. Why? implementation 'com.google.android.gms:play-services-location:8.1.0'

DJ92 commented 5 years ago

Hey @vanceanderson41 , it's for displaying the lat/long on the receipts for customers transaction.

vanceanderson41 commented 5 years ago

Where is the dependency actually used? Are you saying this dependency is required for device location data?

DJ92 commented 5 years ago

Yup it's used by our SDK to retrieve the lat/long and pass along in the upstream services.

vanceanderson41 commented 5 years ago

Ok -- Is there any related documentation? Outside its inclusion in the sample app, I'm not aware of anything related, including what happens if 1) The library is not included in the project that depends in the PPH SDK 2) If the user is presented with a runtime permission dialog (should the even be shown this?) and they decline the permission

vanceanderson41 commented 5 years ago

@DJ92 I seem to have found its related usage in the SDK source (LocationService/Impl) in the form of a combination of Android SDK location and gms/play services location. However, direction toward any pertinent documentation would still be great in order to deterministacally define the type of experience our users should expect.

DJ92 commented 5 years ago

@vanceanderson41 I had a word with our SDK team and it seems like we pass zeroes for lat/long if that library is removed. That would ofcourse remove the prompt. The downside is that upstream processing/risk services may decline a transaction. I don't have definite statistics to back it up but I have tested with and without them and see successful transactions. Also, the documentation is an internal one since our SDK wraps those API's. There's no explicit call required from a merchant so it should be trivial to your implementation. Do let me know if there's something specific you are looking for.

Thanks! -Dheeraj

vanceanderson41 commented 5 years ago

@DJ92 Thanks for all the good info.

One further point of clarification if you don't mind. As far as I'm aware, the location permission itself is one that needs user acceptance at runtime beyond API 23. If the library is included, does the SDK perform permission checks such that the client app only needs to include the dependency and does not require any additional location/permission logic?

vanceanderson41 commented 5 years ago

Adding more info here: just tested using 2.0.1.201812 and included implementation 'com.google.android.gms:play-services-location:8.1.0' and no runtime permissions are gathered. Safe to assume 0s are passed here too?

If so, is it a silent requirement that any client app that integrations with this SDK must also provide all permission based logic?