Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
final ContentRecommendation.Builder builder = new ContentRecommendation.Builder();
builder.setBadgeIcon(R.drawable.vineyard)
.setIdTag("Post" + i + 1)
.setTitle(post.description)
.setProgress(100, 0)
.setSortKey("1.0")
.setAutoDismiss(true)
.setColor(ContextCompat.getColor(this, R.color.primary))
.setBackgroundImageUri(post.thumbnailUrl)
.setGroup("Trending")
.setStatus(ContentRecommendation.CONTENT_STATUS_READY)
.setContentTypes(new String[]{ContentRecommendation.CONTENT_TYPE_VIDEO})
.setText(getString(R.string.header_text_popular))
.setContentIntentData(ContentRecommendation.INTENT_TYPE_ACTIVITY,
buildPendingIntent((ArrayList<Post>) recommendations, post), 0, null)
.setContentImage(bitmap);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment