i am using chrome custom tabs for displaying various websites.i have added a share link button in custom tabs action bar.
builder.setActionButton(bitmap,shareLabel,createPendingShareIntent());
and my pendingintent function
private PendingIntent createPendingShareIntent() {
Intent actionIntent = new Intent(Intent.ACTION_SEND);
actionIntent.setType("text/plain");
actionIntent.putExtra(Intent.EXTRA_TEXT,getResources().getString(R.string.chromeextra));
return PendingIntent.getActivity(
getApplicationContext(), 0, actionIntent, 0);
}
now i want to change Intent.EXTRA_TEXT for sharing links depanding on which link is opened by user.
i know about PendingIntent.FLAG_UPDATE_CURRENT but i don't know how to use in this scenario.