|
|
@ -7,6 +7,7 @@ import android.net.Uri; |
|
|
|
import android.os.Bundle; |
|
|
|
import android.support.annotation.Nullable; |
|
|
|
import android.support.v4.app.DialogFragment; |
|
|
|
import android.util.Log; |
|
|
|
import android.view.LayoutInflater; |
|
|
|
import android.view.View; |
|
|
|
import android.view.ViewGroup; |
|
|
@ -29,6 +30,8 @@ import butterknife.BindView; |
|
|
|
import butterknife.ButterKnife; |
|
|
|
import butterknife.OnClick; |
|
|
|
|
|
|
|
import static com.gmeremit.online.gmeremittance_native.base.PrefKeys.USER_COOUNTRY_CODE; |
|
|
|
|
|
|
|
/** |
|
|
|
* Created by FMI-LT-17 on 2/6/2018. |
|
|
|
*/ |
|
|
@ -75,42 +78,47 @@ public class CustomerSupportFragment extends DialogFragment implements CustomerS |
|
|
|
|
|
|
|
private void performDefaultAction() { |
|
|
|
|
|
|
|
List<CustomerSupportContact> contactList = getCustomerSupportContact(); |
|
|
|
|
|
|
|
CustomerSupportContact selectedContact = null; |
|
|
|
String preferredCountry = GmeApplication.getPreferredCountryCode(); |
|
|
|
|
|
|
|
for (CustomerSupportContact contact : contactList) { |
|
|
|
if (contact.getCountryCode().equalsIgnoreCase(preferredCountry)) { |
|
|
|
selectedContact = contact; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
if (selectedContact == null) |
|
|
|
selectedContact = contactList.get(0); |
|
|
|
|
|
|
|
callTxtView.setText(selectedContact.getCustomerContact()); |
|
|
|
callTxtView.setText(getCustomerSupportContact()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private String getCustomerSupportContact() { |
|
|
|
|
|
|
|
String localeCode = GmeApplication.getStorage().getString(USER_COOUNTRY_CODE, "NP"); |
|
|
|
Log.d("CurrentUserNativeCode", localeCode); |
|
|
|
|
|
|
|
switch (localeCode.toUpperCase()) { |
|
|
|
|
|
|
|
case "KH": |
|
|
|
return "1811-2941"; |
|
|
|
case "TH": |
|
|
|
return "010-9928-6864"; |
|
|
|
case "LK": |
|
|
|
return "1811-2935"; |
|
|
|
case "MN": |
|
|
|
return "010-2973-6864"; |
|
|
|
case "MM": |
|
|
|
return "1811-2938"; |
|
|
|
case "NP": |
|
|
|
return "1811-2934"; |
|
|
|
case "ID": |
|
|
|
return "1811-2945"; |
|
|
|
case "BD": |
|
|
|
return "1811-2943"; |
|
|
|
case "UZ": |
|
|
|
return "010-3015-6864"; |
|
|
|
case "VN": |
|
|
|
return "1811-2937"; |
|
|
|
case "PH": |
|
|
|
return "1811-2936"; |
|
|
|
case "IN": |
|
|
|
return "010-2760-6864"; |
|
|
|
case "PK": |
|
|
|
return "010-2760-6864"; |
|
|
|
default: |
|
|
|
return "1811-2934"; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private List<CustomerSupportContact> getCustomerSupportContact() { |
|
|
|
|
|
|
|
List<CustomerSupportContact> contactList = new ArrayList<>(); |
|
|
|
contactList.add(new CustomerSupportContact("EN", "1811-2934")); |
|
|
|
contactList.add(new CustomerSupportContact("KH", "1811-2941")); |
|
|
|
contactList.add(new CustomerSupportContact("KR", "1811-2934")); |
|
|
|
contactList.add(new CustomerSupportContact("TH", "010-9928-6864")); |
|
|
|
contactList.add(new CustomerSupportContact("LK", "1811-2935")); |
|
|
|
contactList.add(new CustomerSupportContact("MN", "010-2973-6864")); |
|
|
|
contactList.add(new CustomerSupportContact("MM", "1811-2938")); |
|
|
|
contactList.add(new CustomerSupportContact("NP", "1811-2934")); |
|
|
|
contactList.add(new CustomerSupportContact("ID", "1811-2945")); |
|
|
|
contactList.add(new CustomerSupportContact("BD", "1811-2943")); |
|
|
|
contactList.add(new CustomerSupportContact("RU", "010-3015-6864")); |
|
|
|
contactList.add(new CustomerSupportContact("UZ", "010-3015-6864")); |
|
|
|
contactList.add(new CustomerSupportContact("VN", "1811-2937")); |
|
|
|
|
|
|
|
return contactList; |
|
|
|
} |
|
|
|
|
|
|
|
private void init(View view) { |
|
|
|