Exemplo n.º 1
0
 @Override
 public void onStart() {
   super.onStart();
   boolean enableErrorLogging = Settings.getEnableErrorLogging(getBaseContext());
   String API = getString(R.string.flurrykey);
   if (!API.equals("") && enableErrorLogging == true) {
     FlurryAgent.setContinueSessionMillis(30000);
     FlurryAgent.onStartSession(this, API);
   }
 }
Exemplo n.º 2
0
  private void bindData() {
    TippyTipperApplication appState = ((TippyTipperApplication) this.getApplication());

    TextView lbl_split_amount = (TextView) findViewById(R.id.lbl_split_amount);
    TextView lbl_split_tip = (TextView) findViewById(R.id.lbl_split_tip);
    TextView lbl_split_adjustment = (TextView) findViewById(R.id.lbl_split_adjustment);
    TextView lbl_split_total = (TextView) findViewById(R.id.lbl_split_total);
    TextView lbl_NumberOfPeople = (TextView) findViewById(R.id.lbl_NumberOfPeople);

    View inflated_splitTax = findViewById(R.id.inflated_splitTax);

    float excludeTaxRate = Settings.getExcludeTaxRate(getBaseContext());
    if (excludeTaxRate != 0) {
      ViewStub stub_splitTax = (ViewStub) findViewById(R.id.stub_splitTax);
      if (stub_splitTax != null) stub_splitTax.setVisibility(View.VISIBLE);
      else if (inflated_splitTax != null) inflated_splitTax.setVisibility(View.VISIBLE);
      TextView lbl_split_tax = (TextView) findViewById(R.id.lbl_split_tax);
      lbl_split_tax.setText(appState.service.getSplitTaxAmount());
    } else {
      if (inflated_splitTax != null) inflated_splitTax.setVisibility(View.GONE);
    }

    lbl_split_amount.setText(appState.service.getSplitBillAmount());
    lbl_split_tip.setText(appState.service.getSplitTipAmount());
    lbl_split_adjustment.setText(appState.service.getSplitAdjustment());
    lbl_split_total.setText(appState.service.getSplitTotalAmount());
    lbl_NumberOfPeople.setText(Integer.toString(appState.service.getNumberOfPeople()));

    Map<String, String> params = new HashMap<String, String>();
    params.put("Number of People", String.valueOf(appState.service.getNumberOfPeople()));
    params.put("Split Bill Amount", appState.service.getSplitBillAmount());
    params.put("Split Tax Amount", appState.service.getSplitTaxAmount());
    params.put("Split Tip Amount", appState.service.getSplitTipAmount());
    params.put("Split Adjustment Amount", appState.service.getSplitAdjustment());
    params.put("Split Total Amount", appState.service.getSplitTotalAmount());
    FlurryAgent.onEvent("Split Bill Bind Data", params);
  }