Java Code Examples for com.google.zxing.client.result.TelParsedResult#getNumber()

The following examples show how to use com.google.zxing.client.result.TelParsedResult#getNumber() . 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;
  }
}