Are you looking for an answer to the query “You have created an AboutActivity class that displays details about your app. Which code snippet allows you to launch your activity?”? If that’s the case, congratulations! You’ve arrived to the correct location. Throughout this post, I will assist you in answering your question correctly.
You have created an AboutActivity class that displays details about your app. Which code snippet allows you to launch your activity?
Options
- Intent(this, AboutActivity::class).also { intent -> startActivity(intent) } Explanation: Intent(Context packageContext, Class cls) Notice: Class not KClass
- Intent(this, AboutActivity::class.java).also { intent -> startActivity(intent) }
- Intent(this, AboutActivity::class).also { intent -> startService(intent) }
- Intent(this, AboutActivity::class).also { intent -> activity(intent) }
The Correct Answer Is:
- Intent(this, AboutActivity::class.java).also { intent -> startActivity(intent) }
Warming Up
I hope I was able to provide you with the correct answer to your question “You have created an AboutActivity class that displays details about your app. Which code snippet allows you to launch your activity?”. The above question was asked in the LinkedIn Android Skill Quiz Exam. I appreciate your trust in this website. Additionally please keep checking back to this site for more answers to questions from other certification exams.