/// <summary> /// Init. </summary> /// <param name="context"> application context. </param> private EngagementNativePushAgent(Context context) { /* Init */ mContext = context; mEngagementAgent = EngagementAgent.getInstance(context); mStorage = context.getSharedPreferences(STORAGE_FILE, 0); }
/// <summary> /// Send feedback to Reach. </summary> /// <param name="context"> application context. </param> /// <param name="status"> feedback status. </param> /// <param name="extras"> optional feedback payload (like poll answers). </param> public virtual void sendFeedBack(Context context, string status, Bundle extras) { /* Don't send feedback if test campaign */ if (mId[0] != '-') { EngagementAgent agent = EngagementAgent.getInstance(context); agent.sendReachFeedback(mKind.ShortName, mId, status, extras); } }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); mEngagementAgent = EngagementAgent.getInstance(this); /* FIXME temporary empty adapter to avoid side effects with Reach */ if (ExpandableListAdapter == null) { /* This will trigger required initialization */ ListAdapter = new BaseExpandableListAdapterAnonymousInnerClassHelper(this); /* * We can now safely reset the adapter to null to avoid side effect with * 3rd party code testing the null pointer. */ ListAdapter = null; } }
protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); mEngagementAgent = EngagementAgent.getInstance(this); }