Android Open Source - android-async-google-places Review






From Project

Back to project page android-async-google-places.

License

The source code is released under:

Apache License

If you think the Android project android-async-google-places listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package io.github.axxiss.places.model;
// w ww.j  a  va 2s.  c  om
import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Axxiss
 */
public class Review implements Parcelable {
    private AspectRating[] aspects;
    private String author_name;
    private String author_url;
    private String text;
    private int time;

    /**
     * Returns a collection of AspectRating objects, each of which provides a rating of a single
     * attribute of the establishment. The first object in the collection is considered the primary
     * aspect.
     *
     * @return
     */
    public AspectRating[] getAspects() {
        return aspects;
    }

    /**
     * The name of the user who submitted the review. Anonymous reviews are attributed to "A Google
     * user".
     *
     * @return
     */
    public String getAuthorName() {
        return author_name;
    }

    /**
     * The URL to the users Google+ profile, if available.
     *
     * @return the url.
     */
    public String getAuthorUrl() {
        return author_url;
    }

    /**
     * Contains the user's review. When reviewing a location with Google Places, text reviews are
     * considered optional; therefore, this field may by empty.
     *
     * @return the review.
     */
    public String getText() {
        return text;
    }

    /**
     * The time that the review was submitted, measured in the number of seconds since since
     * midnight, January 1, 1970 UTC.
     *
     * @return
     */
    public int getTime() {
        return time;
    }

    protected Review(Parcel in) {
        author_name = in.readString();
        author_url = in.readString();
        text = in.readString();
        time = in.readInt();
        aspects = (AspectRating[]) in.readParcelableArray(AspectRating.class.getClassLoader());
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(author_name);
        dest.writeString(author_url);
        dest.writeString(text);
        dest.writeInt(time);
        dest.writeParcelableArray(aspects, 0);
    }

    public static final Parcelable.Creator<Review> CREATOR = new Parcelable.Creator<Review>() {
        public Review createFromParcel(Parcel in) {
            return new Review(in);
        }

        public Review[] newArray(int size) {
            return new Review[size];
        }
    };
}




Java Source Code List

io.github.axxis.places.sample.MainActivity.java
io.github.axxis.places.sample.PlaceActivity.java
io.github.axxiss.places.PlacesSettings.java
io.github.axxiss.places.Response.java
io.github.axxiss.places.callback.PhotoCallback.java
io.github.axxiss.places.callback.PlacesCallback.java
io.github.axxiss.places.enums.Params.java
io.github.axxiss.places.enums.PlaceType.java
io.github.axxiss.places.enums.Price.java
io.github.axxiss.places.enums.RankBy.java
io.github.axxiss.places.enums.Request.java
io.github.axxiss.places.enums.Status.java
io.github.axxiss.places.exception.ApiPlacesException.java
io.github.axxiss.places.listeners.OnPlaceClickListener.java
io.github.axxiss.places.model.AddressComponent.java
io.github.axxiss.places.model.AspectRating.java
io.github.axxiss.places.model.Event.java
io.github.axxiss.places.model.Geometry.java
io.github.axxiss.places.model.Location.java
io.github.axxiss.places.model.OpeningHours.java
io.github.axxiss.places.model.PeriodData.java
io.github.axxiss.places.model.Period.java
io.github.axxiss.places.model.Photo.java
io.github.axxiss.places.model.Place.java
io.github.axxiss.places.model.Review.java
io.github.axxiss.places.request.BaseSearch.java
io.github.axxiss.places.request.NearbySearch.java
io.github.axxiss.places.request.PlaceDetails.java
io.github.axxiss.places.request.PlaceParams.java
io.github.axxiss.places.request.PlacePhotos.java
io.github.axxiss.places.request.PlaceSearch.java
io.github.axxiss.places.request.PlacesClient.java
io.github.axxiss.places.request.RadarSearch.java
io.github.axxiss.places.request.TextSearch.java