Answer: B Intent in = new Intent
in.setAction("ACTION"); //this should match with other activity intent-filter
in.putExtra("uid","tech");
in.putExtra("city","New Delhi");
in.putExtra("pw","android");
Description: Intent in = new Intent
in.setAction("ACTION"); //this should match with other activity intent-filter
in.putExtra("uid","tech");
in.putExtra("city","New Delhi");
in.putExtra("pw","android");
Answer: B Each screen in android, with which user interacts is called as an activity.
Description:
Answer: D all are true
Description:
Answer: C absolute layout
frame layout
relative layout
linear layout
table layout
Description:
Answer: B it is fetching the path of that image, then converting into absolute path, then creating bitmap with that absolute path using bitmapfactory class.
Description: it is fetching the path of that image, then converting into absolute path, then creating bitmap with that absolute path using bitmapfactory class.
Answer: D all are true
Description:
Answer: C i & iii
Description:
Answer: D both option 1 and option 2 are correct.
Description:
Answer: D both option 1 and option 2 are correct.
Description:
Answer: B An intent which will be fired or triggered at future point of time by some one else (esp Alarm Manager or Notification Manager) on behalf of your application.
Description:
Answer: C i & iii
Description: viewgroup - is invisible container, and abstract class. Layouts are more concrete form of view groups. view groups derive from views, and layouts derive from view groups.
Eg of layouts are 1.framelayout, 2.relative layout, 3.linear layout, etc..
Answer: D Keyevents will flow from Activity to UI view. But Activity will never block event flow, but if it is required UI View can block some event to stop Activity to handle it. Programmer also can block any Key event to stop UI View to handle it.
Description: Key events will flow like this: Android system -> Activity -> Layout -> View -> programmer. First priority will be given programmer written logic, if programmer has written some thing to handle some key events it will be execute first. From there based on the return statement it will decide to flow back that key event to parent or not. eg: if programmer choose to block some key say KEYCODE_0, then for that key code he can say return true; which will block that event and will be destroyed in programmers function only.
Answer: B service process priority (3)
Description: the process priority will be the maximum of components priority.
Answer: A foreground process(1)
Description: the process priority will be the maximum of components priority.
Answer: D Visible process(2)
Description: If dialog is displayed on top of activity, then all the UI events will be sent to Dialogue, so Activity is not in foreground state. But it will be visible to the user.so it is in visible priority (2).
Answer: B foreground process(1)
Description: Generally services that are running will be having medium priority(3) , but we can request to run a service in foreground making it highest priority.
Answer: A program will crash because worker thread is touch UI component directly.
Description: program will crash because worker thread is touch UI component directly.
Answer: C both are true
Description:
Answer: A //make a folder "pics" to store pics taken by the camera using this
final String directory = Environment.getExternalStoragePublicDirectory (Environment.DIRECTORY_PICTURES) + "/pics/";
File nd = new File(directory);
nd.mkdirs();
//what is the picture name?
String file = directory+"myfile"+".jpg";
File myFile = new File(file);
try {
myFile.createNewFile();
} catch (IOException e) {}
Uri myUri = Uri.fromFile(myFile);
//prepare intent for starting camera
Intent in = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
in.putExtra(MediaStore.EXTRA_OUTPUT, myUri);
startActivityForResult(in, 1);
Description:
Answer: D both option 1 and option 3 are correct
Description: