public static void shareChannel(Context context,Channel channel,Uri bitmapUri){
  String shareText=String.format(context.getString(R.string.share_channel_text),channel.getTitle(),channel.getSiteUrl());
  Intent intent=new Intent(Intent.ACTION_SEND);
  intent.setType("text/plain");
  intent.putExtra(Intent.EXTRA_TEXT,shareText);
  if (bitmapUri != null) {
    intent.putExtra(Intent.EXTRA_STREAM,bitmapUri);
  }
  Intent chooser=Intent.createChooser(intent,context.getString(R.string.share_with));
  if (intent.resolveActivity(context.getPackageManager()) != null) {
    context.startActivity(chooser);
  }
}

public static void shareChannel ( Context context , Channel channel , Uri bitmapUri ) { String shareText = String . format ( context . getString ( R . string . share_channel_text ) , channel . getTitle ( ) , channel . getSiteUrl ( ) ) ; Intent intent = new Intent ( Intent . ACTION_SEND ) ; intent . setType ( "text/plain" ) ; intent . putExtra ( Intent . EXTRA_TEXT , shareText ) ; if ( bitmapUri != null ) { intent . putExtra ( Intent . EXTRA_STREAM , bitmapUri ) ; } Intent chooser = Intent . createChooser ( intent , context . getString ( R . string . share_with ) ) ; if ( intent . resolveActivity ( context . getPackageManager ( ) ) != null ) { context . startActivity ( chooser ) ; } }
shares a channel to the android app of choice
