Java Code Examples for android.content.Intent#putCharSequenceArrayListExtra()

The following examples show how to use android.content.Intent#putCharSequenceArrayListExtra() . 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: MessagingBuilder.java    From decorator-wechat with Apache License 2.0 5 votes vote down vote up
/** Intercept the PendingIntent in RemoteInput to update the notification with replied message upon success. */
private PendingIntent proxyDirectReply(final int cid, final MutableStatusBarNotification sbn, final PendingIntent on_reply,
		final RemoteInput remote_input, final @Nullable CharSequence[] input_history, final @Nullable String mention_prefix) {
	final Intent proxy = new Intent(mention_prefix != null ? ACTION_MENTION : ACTION_REPLY)		// Separate action to avoid PendingIntent overwrite.
			.setData(Uri.fromParts(SCHEME_KEY, sbn.getKey(), null))
			.putExtra(EXTRA_REPLY_ACTION, on_reply).putExtra(EXTRA_RESULT_KEY, remote_input.getResultKey())
			.putExtra(EXTRA_ORIGINAL_KEY, sbn.getOriginalKey()).putExtra(EXTRA_CONVERSATION_ID, cid);
	if (mention_prefix != null) proxy.putExtra(EXTRA_REPLY_PREFIX, mention_prefix);
	if (SDK_INT >= N && input_history != null)
		proxy.putCharSequenceArrayListExtra(EXTRA_REMOTE_INPUT_HISTORY, new ArrayList<>(Arrays.asList(input_history)));
	return PendingIntent.getBroadcast(mContext, 0, proxy.setPackage(mContext.getPackageName()), FLAG_UPDATE_CURRENT);
}
 
Example 2
Source File: CodeConverterActivity.java    From Chimee with MIT License 4 votes vote down vote up
public void onDetailsClick(View view) {
    Intent intent = new Intent(this, CodeConverterDetailsActivity.class);
    intent.putCharSequenceArrayListExtra(CodeConverterDetailsActivity.DETAILS_TEXT_KEY, mParagraphs);
    startActivity(intent);
}