SyntaxFix
Write A Post
Hire A Developer
Questions
Pretty simple: Just put it inside a static method.
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(linkYouTube)));