code: public void share() {
          try {
              mContext.getPackageManager().getPackageInfo(getPackage(), 0);
  
              Intent shareIntent = new Intent(Intent.ACTION_SEND);
              shareIntent.setType(TYPE);
              shareIntent.setPackage(getPackage());
              shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, mLink);
              mContext.startActivity(shareIntent);
          } catch (Exception e) {
              Intent openURL = new Intent(Intent.ACTION_VIEW, Uri.parse(getURL() + mLink));
              mContext.startActivity(openURL);
          }
      }
docs: Share the {@code link}
  
  If a social native app has been installed on the device (lets say the Facebook app),
  the {@code link} will be shared using that native app.
  
  If no social native app has been installed, the link will be shared by way of the default browser.