Skip to content

Commit

Permalink
add crash reports, UI fixes, crash on startup, bet slip updates, b 245
Browse files Browse the repository at this point in the history
  • Loading branch information
MIPPL committed Oct 30, 2019
1 parent b4353d2 commit 804d0ae
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 7 deletions.
Binary file modified .idea/caches/build_file_checksums.ser
Binary file not shown.
Binary file modified .idea/caches/gradle_models.ser
Binary file not shown.
13 changes: 10 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId = 'com.wagerrwallet'
minSdkVersion 23
targetSdkVersion 28
versionCode 241
versionName "241"
versionCode 244
versionName "244"
multiDexEnabled true

// Similar to other properties in the defaultConfig block,
Expand All @@ -24,7 +24,10 @@ android {
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static'
}
}

compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
testOptions {
unitTests.returnDefaultValues = true
Expand Down Expand Up @@ -173,4 +176,8 @@ dependencies {
implementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'tools.fastlane:screengrab:1.1.0'
implementation 'com.android.support:support-v4:27.1.1'
def acraVersion = '5.1.3'
implementation "ch.acra:acra-mail:$acraVersion"
implementation "ch.acra:acra-http:$acraVersion"
implementation "ch.acra:acra-toast:$acraVersion"
}
43 changes: 43 additions & 0 deletions app/src/main/java/com/wagerrwallet/WagerrApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.view.Display;
import android.view.WindowManager;

import com.google.firebase.FirebaseApp;
import com.wagerrwallet.presenter.activities.util.BRActivity;
import com.wagerrwallet.tools.listeners.SyncReceiver;
import com.wagerrwallet.tools.manager.InternetManager;
Expand All @@ -31,6 +32,13 @@

import static com.platform.APIClient.BREAD_POINT;

import org.acra.*;
import org.acra.config.CoreConfigurationBuilder;
import org.acra.config.HttpSenderConfigurationBuilder;
import org.acra.config.ToastConfigurationBuilder;
import org.acra.data.StringFormat;
import org.acra.sender.HttpSender;

/**
* BreadWallet
* <p/>
Expand Down Expand Up @@ -77,15 +85,50 @@ public class WagerrApp extends Application {

private static Activity currentActivity;

/* @AcraCore(buildConfigClass = BuildConfig.class,
reportFormat = StringFormat.JSON)
@AcraEmailSender(uri = "https://yourdomain.com/acra/report",
httpMethod = HttpSender.Method.POST,
basicAuthLogin = "*****",
basicAuthPassword = "*****")
*/ public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);

ACRAInit();
}
}

public void ACRAInit() {
CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this)
.setBuildConfigClass(BuildConfig.class)
.setReportFormat(StringFormat.JSON);
/*builder.getPluginConfigurationBuilder(MailSenderConfigurationBuilder.class)
.setMailTo("[email protected]")
.setReportAsFile(true)
.setSubject("Wagerr Crash Report")
.setEnabled(true);*/
builder.getPluginConfigurationBuilder(HttpSenderConfigurationBuilder.class)
.setHttpMethod(HttpSender.Method.POST)
.setUri("http://167.86.74.98/acra.php")
.setEnabled(true);
builder.getPluginConfigurationBuilder(ToastConfigurationBuilder.class).setText("Sending crash report");
// The following line triggers the initialization of ACRA
ACRA.init(this,builder);
}

@Override
public void onCreate() {
super.onCreate();
if (Utils.isEmulatorOrDebug(this)) {
FirebaseApp.initializeApp(this);
// BRKeyStore.putFailCount(0, this);
HOST = "stage2.breadwallet.com";
FirebaseCrash.setCrashCollectionEnabled(false);
// FirebaseCrash.report(new RuntimeException("test with new json file"));
}
ACRAInit();
mContext = this;

if (!Utils.isEmulatorOrDebug(this) && IS_ALPHA)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,11 @@ public void onClick(View v) {
}

public boolean isSearchActive() {
return searchBar.isShown();
boolean ret = false;
if ( searchBar!=null && searchBar.isShown() ) {
ret = true;
}
return ret;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ public void onClick(View v) {
}

public boolean isSearchActive() {
return searchBar.isShown();
boolean ret = false;
if ( searchBar!=null && searchBar.isShown() ) {
ret = true;
}
return ret;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup
ImageButton chevronRight = v.findViewById(R.id.chevron_right);
leaveArrow.setVisibility(View.VISIBLE);
chevronRight.setVisibility(View.INVISIBLE);
} else if (position == 8) {
} /*else if (position == 8) {
boolean shareData = BRSharedPrefs.getShareData(SettingsActivity.this);
if (shareData) {
addon.setText("ON");
} else {
addon.setText("OFF");
}
}
}*/

v.setOnClickListener(item.listener);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,9 @@ public void updateUi() {
mSpreadsContainer.setVisibility(View.VISIBLE);
rlLastContainer = mSpreadsContainer;
}
else {
mSpreadsContainer.setVisibility(View.GONE);
}

bHasTotals = (item.getTotalPoints()>0);
if (bHasTotals) {
Expand All @@ -660,6 +663,10 @@ public void updateUi() {
mTotalsContainer.setVisibility(View.VISIBLE);
rlLastContainer = mTotalsContainer;
}
else {
mTotalsContainer.setVisibility(View.GONE);
}

/*
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
params.addRule(RelativeLayout.BELOW, rlLastContainer.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ else if (confirms == 3)
EventTxUiHolder ev = BetEventTxDataStore.getInstance(mContext).getTransactionByEventId(mContext, "wgr", eventID);
if (ev != null) {
txDescription = String.format("%s - %s", ev.getTxHomeTeam(), ev.getTxAwayTeam());
item.setTeamSearchDescription(txDescription);
} else {
txDescription = String.format("Event #%d: info not avalable", eventID);
}
Expand Down

0 comments on commit 804d0ae

Please sign in to comment.