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

项目: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();
}
项目:GAlette    文件:ScreenViewBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.HitBuilder#setProductAction(ProductAction)
 */
@Override
public HitInterceptor.ScreenViewFacade setProductAction(ProductAction action) {
    builder.setProductAction(action);
    return this;
}
项目:GAlette    文件:EventBuilderDelegate.java   
/**
 * @see com.google.android.gms.analytics.HitBuilders.EventBuilder#setProductAction(ProductAction)
 */
@Override
public HitInterceptor.EventFacade setProductAction(ProductAction action) {
    builder.setProductAction(action);
    return this;
}
项目:GAlette    文件:HitInterceptor.java   
T setProductAction(ProductAction action);