Java 类com.google.android.gms.analytics.ecommerce.Product 实例源码

项目:skeletoid-googleanalytics    文件:GAAppender.java   
private Map<String, String> parsePayload(Map<String, Object> analyticsPayload) {
    HitBuilders.EventBuilder eventBuilder = new HitBuilders.EventBuilder();

    //TODO Should this be protected, or crash in purpose to avoid mistakes on dev side?
    if (analyticsPayload.containsKey(CATEGORY)) {
        eventBuilder.setCategory((String) analyticsPayload.get(CATEGORY));
    }

    if (analyticsPayload.containsKey(ACTION)) {
        eventBuilder.setCategory((String) analyticsPayload.get(ACTION));
    }
    if (analyticsPayload.containsKey(LABEL)) {
        eventBuilder.setLabel((String) analyticsPayload.get(LABEL));
    }

    if (analyticsPayload.containsKey(VALUE)) {
        eventBuilder.setValue((Long) analyticsPayload.get(VALUE));
    }

    if (analyticsPayload.containsKey(PRODUCT)) {
        eventBuilder.addProduct((Product) analyticsPayload.get(PRODUCT));
    }

    if (analyticsPayload.containsKey(PRODUCT_ACTION)) {
        eventBuilder.setProductAction((ProductAction) analyticsPayload.get(PRODUCT_ACTION));
    }

    return eventBuilder.build();
}
项目:BloodHound    文件:EventTracker.java   
@NonNull
public EventTracker addProduct(final Product product) {
    builder.addProduct(product);
    return this;
}
项目:GAlette    文件:ScreenViewBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.HitBuilder#addProduct(Product)
 */
@Override
public HitInterceptor.ScreenViewFacade addProduct(Product product) {
    builder.addProduct(product);
    return this;
}
项目:GAlette    文件:ScreenViewBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.HitBuilder#addImpression(Product, String)
 */
@Override
public HitInterceptor.ScreenViewFacade addImpression(Product product, String impressionList) {
    builder.addImpression(product, impressionList);
    return this;
}
项目:GAlette    文件:EventBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.EventBuilder#addProduct(Product)
 */
@Override
public HitInterceptor.EventFacade addProduct(Product product) {
    builder.addProduct(product);
    return this;
}
项目:GAlette    文件:EventBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.EventBuilder#addImpression(Product, String)
 */
@Override
public HitInterceptor.EventFacade addImpression(Product product, String impressionList) {
    builder.addImpression(product, impressionList);
    return this;
}
项目:GAlette    文件:HitInterceptor.java   
T addProduct(Product product);
项目:GAlette    文件:HitInterceptor.java   
T addImpression(Product product, String impressionList);