app publish
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.
@@ -23,8 +23,8 @@ android {
|
||||
applicationId "ch.pizzapp.capri"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 27
|
||||
versionCode 13 // play store'daki version --> canlı: 12 - dahili test: 12
|
||||
versionName "2.15" // play store'daki version --> canlı: 2.14 - dahili test: 2.14
|
||||
versionCode 14 // play store'daki version --> canlı: 12 - dahili test: 13
|
||||
versionName "2.16" // play store'daki version --> canlı: 2.14 - dahili test: 2.15
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
manifestPlaceholders = [
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":12,"versionName":"2.14","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":13,"versionName":"2.15","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
@@ -14,6 +14,7 @@ import com.afollestad.materialdialogs.DialogAction;
|
||||
import com.afollestad.materialdialogs.MaterialDialog;
|
||||
import com.onesignal.OneSignal;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import butterknife.BindString;
|
||||
@@ -58,6 +59,7 @@ public class ProfileFragment extends BaseFragment {
|
||||
|
||||
@BindString(R.string.bottom_nav_menu_item_profile) String fragmentTitle;
|
||||
@BindString(R.string.alert_logout) String logoutAlertText;
|
||||
@BindString(R.string.something_went_wrong) String genericErrorText;
|
||||
|
||||
public static final java.lang.String FRAGMENT_NAME = "profileFragment";
|
||||
private int REQUEST_CODE_UPDATE_PROFILE = 2563;
|
||||
@@ -173,13 +175,48 @@ public class ProfileFragment extends BaseFragment {
|
||||
return;
|
||||
}
|
||||
|
||||
DialogHelper.showLoadingDialog();
|
||||
|
||||
if(enableNotificationsSwitch.isChecked()) {
|
||||
OneSignal.sendTag(
|
||||
ApiConstants.ONESIGNAL_NOTIFICATION_TAG_KEY,
|
||||
ApiConstants.ONESIGNAL_NOTIFICATION_TAG_VALUE);
|
||||
|
||||
JSONObject tags = new JSONObject();
|
||||
try {
|
||||
tags.put(ApiConstants.ONESIGNAL_NOTIFICATION_TAG_KEY, ApiConstants.ONESIGNAL_NOTIFICATION_TAG_VALUE);
|
||||
OneSignal.sendTags(tags, new OneSignal.ChangeTagsUpdateHandler() {
|
||||
@Override
|
||||
public void onSuccess(JSONObject tags) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(OneSignal.SendTagsError error) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (JSONException e){
|
||||
e.printStackTrace();
|
||||
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
OneSignal.deleteTag(ApiConstants.ONESIGNAL_NOTIFICATION_TAG_KEY);
|
||||
OneSignal.deleteTag(
|
||||
ApiConstants.ONESIGNAL_NOTIFICATION_TAG_KEY,
|
||||
new OneSignal.ChangeTagsUpdateHandler() {
|
||||
@Override
|
||||
public void onSuccess(JSONObject tags) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(OneSignal.SendTagsError error) {
|
||||
DialogHelper.hideLoadingDialog();
|
||||
DialogHelper.showAlertDialog(BaseActivity.currentActivity, genericErrorText);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user