Back to project page mobile-connector-sdk-android.
The source code is released under:
Apache License
If you think the Android project mobile-connector-sdk-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.silverpop.engage.augmentation.plugin; /*from w w w . j a v a2 s . co m*/ import android.content.Context; import android.location.Address; import com.silverpop.engage.config.EngageConfig; import com.silverpop.engage.config.EngageConfigManager; import com.silverpop.engage.domain.UBF; /** * Created by jeremydyer on 6/12/14. */ public class UBFAddressAugmentationPlugin implements UBFAugmentationPlugin { private static final String TAG = UBFAddressAugmentationPlugin.class.getName(); private Context mContext; @Override public void setContext(Context context) { mContext = context; } @Override public boolean isSupplementalDataReady() { if (EngageConfig.currentAddressCache() == null || EngageConfig.addressCacheExpired(mContext)) { return false; } return true; } @Override public boolean processSyncronously() { return false; } @Override public UBF process(UBF ubfEvent) { Address address = EngageConfig.currentAddressCache(); EngageConfigManager cm = EngageConfigManager.get(mContext); //Sets the location address. if (EngageConfig.currentAddressCache() != null) { if (!ubfEvent.getParams().containsKey(cm.ubfLocationAddressFieldName())) { ubfEvent.addParam(cm.ubfLocationAddressFieldName(), EngageConfig.buildLocationAddress()); } } return ubfEvent; } }