live bug fix and crashlytics
This commit is contained in:
BIN
.idea/caches/build_file_checksums.ser
generated
BIN
.idea/caches/build_file_checksums.ser
generated
Binary file not shown.
@@ -1,4 +1,9 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'io.fabric'
|
||||
|
||||
repositories {
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 27
|
||||
@@ -7,8 +12,8 @@ android {
|
||||
applicationId "ch.pizzapp.capri"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 8 // play store'daki version --> canlı : 7 dahili test: 6
|
||||
versionName "2.1" // play store'daki version : 2.0
|
||||
versionCode 9 // play store'daki version --> canlı : 8 dahili test: 6
|
||||
versionName "2.11" // play store'daki version : 2.1
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
@@ -63,6 +68,9 @@ dependencies {
|
||||
implementation('com.braintreepayments.api:drop-in:3.1.0') {
|
||||
exclude group: 'com.braintreepayments.api', module: 'braintree'
|
||||
}
|
||||
implementation('com.crashlytics.sdk.android:crashlytics:2.9.4@aar') {
|
||||
transitive = true;
|
||||
}
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"2.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":8,"versionName":"2.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
@@ -13,6 +13,12 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
|
||||
<meta-data
|
||||
android:name="io.fabric.ApiKey"
|
||||
android:value="3a1f8c7084012f6d8cb2bdebbd9bae60fd671036"
|
||||
/>
|
||||
|
||||
<activity
|
||||
android:name=".activity.SplashActivity"
|
||||
android:screenOrientation="portrait">
|
||||
|
||||
@@ -2,9 +2,11 @@ package ch.pizzapp.android;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.jakewharton.picasso.OkHttp3Downloader;
|
||||
import com.squareup.picasso.Picasso;
|
||||
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
import uk.co.chrisjenx.calligraphy.CalligraphyConfig;
|
||||
|
||||
/**
|
||||
@@ -18,6 +20,7 @@ public class App extends Application {
|
||||
super.onCreate();
|
||||
initCalligraphy();
|
||||
initPicasso();
|
||||
Fabric.with(this, new Crashlytics());
|
||||
}
|
||||
|
||||
private void initCalligraphy(){
|
||||
|
||||
@@ -182,7 +182,7 @@ public class MainActivity extends BaseActivity {
|
||||
if (currentFragmentName.equals(MenuFragment.FRAGMENT_NAME))
|
||||
return true;
|
||||
fragmentManager.beginTransaction().replace(R.id.fragmentContainer,
|
||||
MenuFragment.newInstance(categoryList.get(2))).commit();
|
||||
MenuFragment.newInstance(categoryList.get(3))).commit();
|
||||
currentFragmentName = MenuFragment.FRAGMENT_NAME;
|
||||
|
||||
shoppingCartImageView.setImageDrawable(whiteCartDrawable);
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ApiService {
|
||||
|
||||
HttpLoggingInterceptor logging = new HttpLoggingInterceptor(); // set your desired log level
|
||||
logging.setLevel(HttpLoggingInterceptor.Level.BODY);
|
||||
builder.addInterceptor(logging);
|
||||
//builder.addInterceptor(logging);
|
||||
|
||||
OkHttpClient client = builder.build();
|
||||
|
||||
|
||||
@@ -623,6 +623,12 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
if(paymentMethodNonce != null){
|
||||
params.put("payment_method_nonce", paymentMethodNonce);
|
||||
}
|
||||
if(SessionHelper.isUserUsedPizzapassCampaign()){
|
||||
params.put("is_pizza_pass_campaign", true);
|
||||
}
|
||||
if(SessionHelper.isUserUsedChampagneCampaign()){
|
||||
params.put("is_champagne_campaign", true);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
@@ -630,7 +636,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
|
||||
CreateOrderActivity createOrderActivity = (CreateOrderActivity) getActivity();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
if(isCartContainsAnyPizza(createOrderActivity.getCartInfo().getProducts())){
|
||||
if(isCartContainsAnyPizza()){
|
||||
stringBuilder.append(slicePizzaText).append(" : ");
|
||||
if(createOrderActivity.getSlicePizza()){
|
||||
stringBuilder.append(yesText);
|
||||
@@ -662,10 +668,10 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
|
||||
private boolean isCartContainsAnyPizza(ArrayList<CartProductModel> cartProductList){
|
||||
private boolean isCartContainsAnyPizza(){
|
||||
boolean containsAnyPizza = false;
|
||||
outerloop:
|
||||
for(CartProductModel cartProductModel : cartProductList){
|
||||
for(CartProductModel cartProductModel : createOrderActivity.getCartInfo().getProducts()){
|
||||
if(SharedPrefsHelper.readPizzaCategoryIdList().contains(Integer.valueOf(cartProductModel.getProductId()))){
|
||||
containsAnyPizza = true;
|
||||
break;
|
||||
@@ -691,6 +697,7 @@ public class CreateOrderSummaryFragment extends CreateOrderBaseFragment {
|
||||
if(response.isSuccessful() &&
|
||||
response.body().getData() != null &&
|
||||
response.body().isSuccess()){
|
||||
response.body().getData().checkNull();
|
||||
createOrderActivity.setCartInfo(response.body().getData());
|
||||
}
|
||||
else
|
||||
|
||||
@@ -49,4 +49,15 @@ public class CartInfoModel implements Serializable {
|
||||
public ArrayList<CartTotalModel> getTotalsList() {
|
||||
return totals;
|
||||
}
|
||||
|
||||
public void checkNull(){
|
||||
if(products == null){
|
||||
products = new ArrayList<>();
|
||||
}
|
||||
if(totals == null){
|
||||
totals = new ArrayList<>();
|
||||
}
|
||||
CartProductModel.checkNull(products);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||
classpath 'io.fabric.tools:gradle:1.+'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in New Issue
Block a user