Back to project page playnomics-android.
The source code is released under:
Apache License
If you think the Android project playnomics-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.playnomics; /*from w ww. j a va 2 s .c o m*/ import java.util.Map; import android.content.Context; import android.util.Log; import android.widget.Toast; import com.playnomics.android.sdk.IPlaynomicsPlacementDelegate; public class RichDataFrameDelegate implements IPlaynomicsPlacementDelegate { private final String placementName; private Context context; public RichDataFrameDelegate(String placementName, Context context){ this.placementName = placementName; this.context = context; } @Override public void onShow(Map<String, Object> jsonData) { postToastMessage(String.format("onShow:\n %s", jsonData == null ? "No data" : jsonData.toString())); } @Override public void onTouch(Map<String, Object> jsonData) { postToastMessage(String.format("onTouch:\n %s", jsonData == null ? "No data" : jsonData.toString())); } @Override public void onClose(Map<String, Object> jsonData) { postToastMessage(String.format("onClose:\n %s", jsonData == null ? "No data" : jsonData.toString())); } @Override public void onRenderFailed() { postToastMessage(String.format("Placement could not be rendered: %s", placementName)); } private void postToastMessage(String message){ int duration = Toast.LENGTH_LONG; Toast toast = Toast.makeText(context, message, duration); toast.show(); } }