public void with(MatomoApplication matomoApplication) { with(matomoApplication.getTracker()); }
/** * Gives you an all purpose thread-safe persisted Tracker. * * @return a shared Tracker */ public synchronized Tracker getTracker() { if (mMatomoTracker == null) mMatomoTracker = onCreateTrackerConfig().build(getMatomo()); return mMatomoTracker; }
@Override public void onCreate() { ShadowLog.stream = System.out; super.onCreate(); }
@Test public void testApplication() { MatomoApplication matomoApplication = (MatomoApplication) Robolectric.application; Assert.assertEquals(matomoApplication.getMatomo(), Matomo.getInstance(matomoApplication)); } }
@Test public void testApplication() { MatomoApplication matomoApplication = (MatomoApplication) Robolectric.application; Assert.assertEquals(matomoApplication.getMatomo(), Matomo.getInstance(matomoApplication)); } }
public boolean safelyWith(MatomoApplication matomoApplication) { return safelyWith(matomoApplication.getTracker()); }
/** * Gives you an all purpose thread-safe persisted Tracker. * * @return a shared Tracker */ public synchronized Tracker getTracker() { if (mMatomoTracker == null) mMatomoTracker = onCreateTrackerConfig().build(getMatomo()); return mMatomoTracker; }
@Override public void onCreate() { ShadowLog.stream = System.out; super.onCreate(); }
private Tracker getTracker() { return ((MatomoApplication) getApplication()).getTracker(); }
@Override public void onCreate() { super.onCreate(); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectAll() .penaltyLog() .build()); onInitTracker(); }
public void with(MatomoApplication matomoApplication) { with(matomoApplication.getTracker()); }
@Override public void onCreate() { super.onCreate(); StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() .detectAll() .penaltyLog() .build()); onInitTracker(); }
public boolean safelyWith(MatomoApplication matomoApplication) { return safelyWith(matomoApplication.getTracker()); }
private Tracker getTracker() { return ((MatomoApplication) getApplication()).getTracker(); }
@Override public void onClick(View v) { ((MatomoApplication) getApplication()).getTracker().setDryRunTarget(((CheckBox) v).isChecked() ? Collections.synchronizedList(new ArrayList<Packet>()) : null); } });
@Override public void onClick(View v) { ((MatomoApplication) getApplication()).getTracker().setDryRunTarget(((CheckBox) v).isChecked() ? Collections.synchronizedList(new ArrayList<Packet>()) : null); } });
@Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { try { int timeoutMin = Integer.valueOf(charSequence.toString().trim()); timeoutMin = Math.abs(timeoutMin); ((MatomoApplication) getApplication()).getTracker() .setSessionTimeout(timeoutMin * 60); } catch (NumberFormatException e) { ((EditText) settingsActivity.findViewById(R.id.sessionTimeoutInput)).setText("30"); Timber.d("not a number: %s", charSequence.toString()); } }
@Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { try { int timeoutMin = Integer.valueOf(charSequence.toString().trim()); timeoutMin = Math.abs(timeoutMin); ((MatomoApplication) getApplication()).getTracker() .setSessionTimeout(timeoutMin * 60); } catch (NumberFormatException e) { ((EditText) settingsActivity.findViewById(R.id.sessionTimeoutInput)).setText("30"); Timber.d("not a number: %s", charSequence.toString()); } }
@Override public void onClick(View v) { ((MatomoApplication) getApplication()).getTracker().setOptOut(((CheckBox) v).isChecked()); } });
@Override public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) { try { int interval = Integer.valueOf(charSequence.toString().trim()); ((MatomoApplication) getApplication()).getTracker() .setDispatchInterval(interval); } catch (NumberFormatException e) { Timber.d("not a number: %s", charSequence.toString()); } }