In which method of an Activity do you usually call the setContentView method?
Question 1In which method of an Activity do you usually call the setContentView method? 1 point onCreate onStart onRestart onResume onPause onStop onDestroy
Question 1In which method of an Activity do you usually call the setContentView method? 1 point onCreate onStart onRestart onResume onPause onStop onDestroy
Question 3Which action can you use for an implicit intent to open a camera app and receive the resulting photo? 1 point ACTION_GET_PICTURE ACTION_CAMERA_SHOT ACTION_IMAGE_CAPTURE
Question 2What happens at the execution of the following code if no app able to handle ACTION_SENDTO is installed on your phone? 12345Intent smsIntent = new Intent(Intent.ACTION_SENDTO);smsIntent.setData(Uri.parse(“smsto:5556”));smsIntent.putExtra(“sms_body”, “hello”);startActivity(smsIntent);toastFailed.show();1 point The…
Question 1Why is the following Intent considered as an “implicit” intent? 123Intent smsIntent = new Intent(Intent.ACTION_SENDTO);smsIntent.setData(Uri.parse(“smsto:5556”));smsIntent.putExtra(“sms_body”, “hello”);1 point Because the destination and the content are not specified at the creation…
Question 4The putExtra methods of the Intent class take as second parameter the value or reference to be passed to the target of the intent. What is the first parameter?…
Question 4What must you remember to do so your WebView can display a page hosted on the Internet? 1 point Declare that the application needs the permission to access the…
Question 1Which component from the palette of the Design view of your XML layout file must you choose to include in your GUI an area able to display a web…
Question 1Which of the following image file requires modification before being placed in the res/drawable folder? 1 point nice_house.Tiff desert_3.png 101Dalmatians.jpg building.svg
Question 3This is the content of the file data/data/com.myuniquename.mygame/shared_prefs/mypref.xml: 1234<?xml version=’1.0′ encoding=’utf-8′ standalone=’yes’ ?><map><int name=”age” value=”23″ /></map>What will be the content after the execution of the following code: 1234SharedPreferences preferences…
Question 1
In which folder of the emulator file system do you find the preferences file created by the app named “myGame”?
1 point
com.myuniquename.mygame/data/data/shared_prefs
storage/R.shared_prefs.mygame
data/data/com.myuniquename.mygame/cache
data/data/com.myuniquename.mygame/shared_prefs