use of com.voipgrid.vialer.api.models.MobileNumber in project vialer-android by VoIPGRID.
the class SetupActivity method onUpdateMobileNumber.
@Override
public void onUpdateMobileNumber(Fragment fragment, String mobileNumber) {
enableProgressBar(true);
AccountHelper accountHelper = new AccountHelper(this);
boolean success = createAPIService(accountHelper.getEmail(), accountHelper.getPassword());
// Post mobileNumber to VoIPGRID platform.
if (success) {
Call<MobileNumber> call = mApi.mobileNumber(new MobileNumber(mobileNumber));
call.enqueue(this);
}
}
use of com.voipgrid.vialer.api.models.MobileNumber in project vialer-android by VoIPGRID.
the class AccountActivity method save.
private void save() {
findViewById(R.id.container).setFocusableInTouchMode(true);
String number = ((EditText) findViewById(R.id.account_mobile_number_edit_text)).getText().toString();
number = PhoneNumberUtils.formatMobileNumber(number);
Api api = ServiceGenerator.createService(this, Api.class, getString(R.string.api_url), getEmail(), getPassword());
Call<MobileNumber> call = api.mobileNumber(new MobileNumber(number));
call.enqueue(this);
mSystemUser.setMobileNumber(number);
populate();
}
Aggregations