Answer: A SmsManager s = SmsManager.getDefault();
s.sendTextMessage("8527801400", null,
"Hi how are you?", null, null);
Description: SmsManager s = SmsManager.getDefault();
s.sendTextMessage("8527801400", null,
"Hi how are you?", null, null);
Note: first parameter is destination number, second parameter is source number which you can omit, third parameter is text to be sent, fourth parameter is sent intent, fifth parameter delivery intent.
Sent intent: You can give a pending intent that should be broad casted once your message reaches your service providers SMS center.
Delivery intent: you can give a pending intent that should be broad casted once your message is delivered to the destination phone.
Answer: B manifest
Description: manifest is the root tag for Manifest file.
Answer: D all are true
Description:
Answer: B Connect phone to eclipse, open DDMS, click devices, click on camera button (on top), which opens the current screen of the phone or emulator, click save to save that screen shot as immage.
Description:
Answer: A backup current ROM.
turn on USB debugging.
May have to install Android SDK in the computer.
unlock boot loader by logging in to your oem site.
Description:
Answer: B 1.5 cupcake
1.6 donut
2.0, 2.1 eclair
2.2 froyo
2.3.x ginger bread
3.x honey comb
4.0.x ice cream sandwitch
4.1, 4.2, 4.3 jelley bean
4.4 kitkat
Description:
Answer: C i,ii,&iii
Description:
Answer: A android sdk contains set of libraries, APIs, and set of tools to develop, test, and debug android applications for android powered devices.
Description:
Answer: D all are true
Description:
Answer: A The mobile that runs on android O.S and android platform is called as android mobile. Eg: Samsung Galaxy phones, LG optimus phones, etc.
Description:
Answer: C both are correct
Description:
Answer: D all are true
Description:
Answer: C i,ii, & iii
Description:
Answer: A only the process or application which has created that preference file can access it. other applications can't access it.
Description: MODE_PRIVATE is meant for accessibility permission for an application. only that app which has created that preference file can access it.
Answer: B Use getSharedPreferences("name", MODE_PRIVATE);
Description: If the preference file is having some name, then only other activities can access it.
MODE_PRIVATE says it is accessible with in the application.
Answer: D ii & iii
Description: It will start gallery app, even if there are no images in the gallery.after selecting any image in gallery, it will return the URI of that image to this caller.
Note: if there are no images in the gallery, then you can start camera from there, capture an image, and it will return that captured image as URI to the calling activity.
Answer: A Intent in = new Intent(Intent.ACTION_SEND);
in.setType("message/rfc822");
in.putExtra(Intent.EXTRA_EMAIL, new String[]{"user@gmail.com",
"more@gmail.com"});
in.putExtra(Intent.EXTRA_SUBJECT, "Hey imp!");
in.putExtra(Intent.EXTRA_TEXT, "WHAT ARE YOU DOING?");
startActivity(Intent.createChooser(in, "Select one option"));
Description: Intent in = new Intent(Intent.ACTION_SEND);
in.setType("message/rfc822"); //this is MIME type of email
in.putExtra(Intent.EXTRA_EMAIL, new String[]{"user@gmail.com",
"more@gmail.com"}); // to address field
in.putExtra(Intent.EXTRA_SUBJECT, "Hey imp!"); //subject of your mail
in.putExtra(Intent.EXTRA_TEXT, "WHAT ARE YOU DOING?"); //body of your email
startActivity(Intent.createChooser(in, "Select one option"));
Answer: D service process priority (3)
Description: Empty process is priority 5. that is last priority (least priority).
Note: in case of low memory scenarios, android will start killing from empty processes.
Answer: C By using getSharedPreferences("name",MODE_WORLD_READABLE);
Description: Either we can use
getSharedPreferences("name",MODE_WORLD_READABLE); or getSharedPreferences("name",MODE_WORLD_WRITABLE);
Note: But accessing or sharing preference file to outside world is deprecated with recent versions. so it is no more supported. But in older versions you can use above mentioned flags to share a preference file with outside world applications.
Answer: D i, ii, & iii
Description: There are two types of contexts available in android to create any component.
1. this context (or) this pointer
2. application context
When programmer wants to create any component or control, then you have to use one of the contexts.
eg: TextView t = new TextView(this);
Here we are using this pointer (context).
eg: static TextView st = new TextView(getApplicationContext());
Here we are using application context, because it is a static variable whose life time will be through out application life time.
If you use this pointer here, then it will leak memory (memory wastage) of your activity.
When to use this & getapplicationcontext:
1.If the control or variable you are creating should belong to application level then use applicationContext.
2.If the control or variable you are creating should belong to Activity level then use this pointer or this context.
Note: Generally people will think that java will not have memory leaks. But if you don't use contexts properly, then it might lead to some dangerous memory leaks in your android application.
Tip : Don't ever link between this pointer and static variables. If you follow this simple tip, you can almost reduce most of your memory leaks in your program.