diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index 3a0f7ce4b..e3b0631b3 100644 Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ diff --git a/.idea/caches/gradle_models.ser b/.idea/caches/gradle_models.ser index 8d3e51aef..dddba8939 100644 Binary files a/.idea/caches/gradle_models.ser and b/.idea/caches/gradle_models.ser differ diff --git a/app/build.gradle b/app/build.gradle index 4cc4592ec..ef56d2a14 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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, @@ -24,7 +24,10 @@ android { arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=gnustl_static' } } - + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } } testOptions { unitTests.returnDefaultValues = true @@ -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" } diff --git a/app/src/main/java/com/wagerrwallet/WagerrApp.java b/app/src/main/java/com/wagerrwallet/WagerrApp.java index 25d5b1774..fe1359e96 100644 --- a/app/src/main/java/com/wagerrwallet/WagerrApp.java +++ b/app/src/main/java/com/wagerrwallet/WagerrApp.java @@ -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; @@ -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 *
@@ -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("mip.putalocura@gmail.com") + .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) diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java index d333623c6..57008be4c 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/EventsActivity.java @@ -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 diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java index 7ae5c7a28..067a82adf 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/WalletActivity.java @@ -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 diff --git a/app/src/main/java/com/wagerrwallet/presenter/activities/settings/SettingsActivity.java b/app/src/main/java/com/wagerrwallet/presenter/activities/settings/SettingsActivity.java index fa43ea24c..f706b921f 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/activities/settings/SettingsActivity.java +++ b/app/src/main/java/com/wagerrwallet/presenter/activities/settings/SettingsActivity.java @@ -99,7 +99,7 @@ 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"); @@ -107,7 +107,7 @@ public View getView(int position, @Nullable View convertView, @NonNull ViewGroup addon.setText("OFF"); } - } + }*/ v.setOnClickListener(item.listener); diff --git a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java index 912e6bf07..e75543404 100644 --- a/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java +++ b/app/src/main/java/com/wagerrwallet/presenter/fragments/FragmentEventDetails.java @@ -651,6 +651,9 @@ public void updateUi() { mSpreadsContainer.setVisibility(View.VISIBLE); rlLastContainer = mSpreadsContainer; } + else { + mSpreadsContainer.setVisibility(View.GONE); + } bHasTotals = (item.getTotalPoints()>0); if (bHasTotals) { @@ -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()); diff --git a/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java b/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java index ecd9e2073..bd0029f75 100644 --- a/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java +++ b/app/src/main/java/com/wagerrwallet/tools/adapter/TransactionListAdapter.java @@ -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); }