@Override public void handleButtonPress(int index) { TelParsedResult telResult = (TelParsedResult) getResult(); switch (index) { case 0: dialPhoneFromUri(telResult.getTelURI()); // When dialer comes up, it allows underlying display activity to continue or something, // but app can't get camera in this state. Avoid issues by just quitting, only in the // case of a phone number getActivity().finish(); break; case 1: String[] numbers = new String[1]; numbers[0] = telResult.getNumber(); addPhoneOnlyContact(numbers, null); break; } }
@Override public void handleButtonPress(int index) { TelParsedResult telResult = (TelParsedResult) getResult(); switch (index) { case 0: dialPhoneFromUri(telResult.getTelURI()); // When dialer comes up, it allows underlying display activity to // continue or something, // but app can't get camera in this state. Avoid issues by just // quitting, only in the // case of a phone number getActivity().finish(); break; case 1: String[] numbers = new String[1]; numbers[0] = telResult.getNumber(); addPhoneOnlyContact(numbers, null); break; } }
@Override public void handleClick(int buttonID) { TelParsedResult telResult = (TelParsedResult) getResult(); switch (buttonID) { case R.id.button_dial: dialPhoneFromUri(telResult.getTelURI()); // When dialer comes up, it allows underlying display activity to continue or something, // but app can't get camera in this state. Avoid issues by just quitting, only in the // case of a phone number getActivity().finish(); break; case R.id.button_add_contact: addPhoneOnlyContact(new String[] {telResult.getNumber()}, null); break; } }
@Override public void handleButtonPress(int index) { TelParsedResult telResult = (TelParsedResult) getResult(); switch (index) { case 0: dialPhoneFromUri(telResult.getTelURI()); break; case 1: String[] numbers = new String[1]; numbers[0] = telResult.getNumber(); addContact(null, numbers, null, null, null, null, null); break; } }