com.google.zxing.client.result.TelParsedResult Java Examples

The following examples show how to use com.google.zxing.client.result.TelParsedResult. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TelResultHandler.java    From ZXing-Standalone-library with Apache License 2.0 6 votes vote down vote up
@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;
  }
}
 
Example #2
Source File: TelResultHandler.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 6 votes vote down vote up
@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;
  }
}
 
Example #3
Source File: TelResultHandler.java    From weex with Apache License 2.0 6 votes vote down vote up
@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;
  }
}
 
Example #4
Source File: TelResultHandler.java    From Study_Android_Demo with Apache License 2.0 6 votes vote down vote up
@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;
  }
}
 
Example #5
Source File: TelResultHandler.java    From barcodescanner-lib-aar with MIT License 6 votes vote down vote up
@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;
  }
}
 
Example #6
Source File: TelResultHandler.java    From reacteu-app with MIT License 6 votes vote down vote up
@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;
  }
}
 
Example #7
Source File: TelResultHandler.java    From zxingfragmentlib with Apache License 2.0 6 votes vote down vote up
@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;
  }
}
 
Example #8
Source File: TelResultHandler.java    From android-apps with MIT License 5 votes vote down vote up
@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();
      addPhoneOnlyContact(numbers, null);
      break;
  }
}
 
Example #9
Source File: TelResultFragment.java    From privacy-friendly-qr-scanner with GNU General Public License v3.0 3 votes vote down vote up
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View v = inflater.inflate(R.layout.fragment_result_tel, container, false);
    result = (TelParsedResult) parsedResult;

    TextView resultField = (TextView) v.findViewById(R.id.result_field_tel);

    resultField.setText(result.getNumber());

    return v;
}