When building CustomTabsIntent using builder and setting setActionButton:
new CustomTabsIntent.Builder(getSession())
.setActionButton(getShareIcon(),
"Share text",
getShareIntent(),
true)
.build()
Crude implementation of getShareIntent:
@NonNull
private PendingIntent getShareIntent() {
Intent shareIntent = new Intent(mContext, ShareBroadcastReceiver.class);
shareIntent.putExtra("extra", someValue);
return PendingIntent.getBroadcast(mContext, 0, shareIntent, 0);
}
I espect to get the extra's content in my Broadcast receiver. It works but when I rebuild it with different "someValue" I receive the initaial someValue.
Custom Tabs seem to only send the initial intent and ignore the updated intents until the Custom Tab Service is restarted.
The behaviour is not documented. Is it a bug?