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