-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Android Place Photos Support #154
base: place-photos
Are you sure you want to change the base?
Commits on Jun 29, 2018
-
Configuration menu - View commit details
-
Copy full SHA for d3192a8 - Browse repository at this point
Copy the full SHA d3192a8View commit details -
index.js: Add missing EOF newline
Files should always end with new lines to avoid introducing extraneous diffs.
Configuration menu - View commit details
-
Copy full SHA for 258194c - Browse repository at this point
Copy the full SHA 258194cView commit details -
Android: Add getPlacePhoto and getPlacePhotos
This introduces preliminary support for 1. retrieving photo metadata for a place and 2. persisting the associated photos to disk where they can be accessed via react-native using an `<Image>` tag. Example usage via JS: ```javascript const placePhotos = await RNGooglePlaces.getPlacePhotos(placeId) const firstPhotoUri = await RNGooglePlaces.getPlacePhoto(placePhotos[0]) console.info(firstPhotoUri) ```
Configuration menu - View commit details
-
Copy full SHA for e030a82 - Browse repository at this point
Copy the full SHA e030a82View commit details
Commits on Jul 1, 2018
-
getPlacePhoto: write image to cache directory
Place photos shouldn't be persisted indefinitely. We write them to a cache directory so that the OS knows that it can clean these files up if necessary. This also removes specifying context.MODE_PRIVATE when creating the FileOutputStream, which doesn't seem necessary.
Configuration menu - View commit details
-
Copy full SHA for 2f03075 - Browse repository at this point
Copy the full SHA 2f03075View commit details -
getURIForBitmap: return a URI instead of String
This makes the return type consistent with the method's current naming.
Configuration menu - View commit details
-
Copy full SHA for 7f6a8ef - Browse repository at this point
Copy the full SHA 7f6a8efView commit details
Commits on Jul 2, 2018
-
getUriForBitmap: correct invalid return type
File.toURI returns a URI, not a Uri.
Configuration menu - View commit details
-
Copy full SHA for d0c5aa1 - Browse repository at this point
Copy the full SHA d0c5aa1View commit details
Commits on Jul 6, 2018
-
Make use of ResultCallbacks and ResultTransform
ResultCallbacks (vs ResultCallback) allows us to factor out status checks because we can define specific handlers for success/failure cases. ResultTransform allows us to neatly chain API calls without needing to pass promise references down deeply into multiple methods.
Configuration menu - View commit details
-
Copy full SHA for 4cc2e39 - Browse repository at this point
Copy the full SHA 4cc2e39View commit details -
Configuration menu - View commit details
-
Copy full SHA for a255a49 - Browse repository at this point
Copy the full SHA a255a49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6724345 - Browse repository at this point
Copy the full SHA 6724345View commit details -
Configuration menu - View commit details
-
Copy full SHA for a87467c - Browse repository at this point
Copy the full SHA a87467cView commit details -
getScaledPhoto: Call .release() on buffer
I'd believed that this wasn't required when using .then(...).andFinally(...) pattern, but according to the console warnings this was resulting in, it is indeed required.
Configuration menu - View commit details
-
Copy full SHA for a6c6954 - Browse repository at this point
Copy the full SHA a6c6954View commit details -
Configuration menu - View commit details
-
Copy full SHA for 669cf38 - Browse repository at this point
Copy the full SHA 669cf38View commit details