Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Added method getViewIntent, which is missing in the code sample #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,14 @@ public static Recipe fromCursor(Cursor cursor) {
return recipe;
}

public Intent getViewIntent(Context context) {
Intent intent = new Intent(context, RecipeActivity.class);
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(getUrl()));
return intent;
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Unnecessary new line

public static class Ingredient {
private String amount;
private String description;
Expand Down