Select chapter



basics (6.papers)
activities (5.papers)
services (2.papers)
threads (2.papers)
receivers (1.papers)
advanced android (2.papers)
SQLite database (1.papers)
adapters (1.papers)
adb and ddms (1.papers)
widgets (1.papers)
fragments (1.papers)
UI (1.papers)
Hide

Sponsored Links


  

android basics interview questions and answers

1
Is it possible to have extras in intent-filter?
  1. Yes
  2. Yes because, it will check for matching extras of the intent
  3. No, Intent-filter tag doesn't have extra tag at all.
  4. Intent-filter has extra tag, but it is not mandatory to use it.
Show Answer
Share Facebook gmail Twitter
2
What is the difference between menus and dialogs in android?
  1. Menus are designed using xml, they will not change so frequently.
  2. Dialogs are built using code as they frequently change the content.
  3. Both, option 1 and option 2 are correct.
  4. Both, option 1 and option 2 are wrong.
Show Answer
Share Facebook gmail Twitter
3
How many types of menus are there in android?
  1. SubMenu, OptionsMenu
  2. SubMenu, OptionsMenu, ContextMenu
  3. SubMenu, DialogMenu, ContextMenu
  4. SubMenu, SubMenu, DialogMenu
Show Answer
Share Facebook gmail Twitter
4
How many types of dialogues are there in Android?
  1. AlertDialog, Context Dialog, Date & time picker dialog
  2. AlertDialog, Progressdialog, date & time picker dialog
  3. items dialog, progress dialog, date & time picker dialog
  4. menu dialog, progress dialog, date & time picker dialog
Show Answer
Share Facebook gmail Twitter
5
What is the difference between getPreferences and getSharedPreferences in android ? To secure preference file from other activities in an android application, which one to use? getpreferences() or getsharedpreferences()?
  1. getPreferences()
  2. getSharedPreferences()
  3. Use getPreferences(), but its not guaranteed to be protected as it will be stored with the name of Activity.
  4. use getSharedPreferences(), but its not guaranteed to be protected as it will be stored with the name of Activity.
Show Answer
Share Facebook gmail Twitter
6
Open messaging application, start composing a message, press home button. Now start Gmail application. Will it create a new task or is it part of old messaging task?
  1. it starts a new task
  2. it is part of old task only
  3. Neither it creates new task, nor it run in old. it runs in its own process
  4. Neither it creates new task, nor it run in old. it runs in previous process.
Show Answer
Share Facebook gmail Twitter
7
What is the difference between intent and intent-filter in android?
  1. intent is a message passing mechanism between components of android, except for content provider.
  2. intent-filter tells about the capabilities of that component.
  3. option 1 and 2 are right.
  4. option 1 and 2 are wrong.
Show Answer
Share Facebook gmail Twitter
8
What is the difference between local variables, instance variables, and class variables?
  1. local variables - declared in the class
    class variables - declared in function
    instance variables - declared in class which are static
  2. local variables - declared in the function
    class variables - declared in class, non static
    instance variables - declared in class which are static
  3. local variables - declared in the function
    class variables - declared in class, static
    instance variables - declared in class which are non static
  4. local variables - declared in the class which are static
    class variables - declared in class, non static
    instance variables - declared in the function
Show Answer
Share Facebook gmail Twitter
9
what is the permission required to make a call in android, by using  ACTION_CALL ?
  1. android.permission.CALL_PHONE
  2. android.permission.DIAL_PHONE
  3. Intent.permission.CALL_PHONE
  4. intent.permission.DIAL_PHONE
Show Answer
Share Facebook gmail Twitter
10
what is the folder structure of android project in eclipse?
  1. src -> contains source code files
    gen -> auto generated files by appt tool
    bin -> contains .class and apk files
    res -> contains all resource files
    drawable -> contains images used for project
    layouts -> contains layout xml designs
    values -> contains strings xml files
  2. src -> contains source code files
    gen -> auto generated files by appt tool
    bin -> contains only .class files
    res -> contains all resource files
    drawable -> contains images used for project
    layouts -> contains layout xml designs
    values -> contains raw xml files
  3. src -> contains only java files
    gen -> auto generated files by appt tool
    bin -> contains only apk files
    res -> contains all resource files
    drawable -> contains images used for project
    layouts -> contains layout xml designs
    values -> contains raw xml files
  4. src -> contains source code files
    gen -> c files
    bin -> contains only .class files
    res -> contains all resource files
    drawable -> contains images used for project
    layouts -> contains layout xml designs
    values -> contains raw xml files
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
12
How to trigger a component which don't have any action in the intent filter, from outside of that application?
  1. No, with out any action no one can trigger or start that component from outside world.
  2. You can trigger that component from outside that application using explicit intent.
Show Answer
Share Facebook gmail Twitter
13
Is it possible to have multiple actions in an intent-filter?
  1. No, intent-filter should have only one action.
  2. they can have 0 or more number of actions.
  3. they can have 0 or more number of actions. But if that component has only one intent-filter with 0 actions, then that component can be triggered using only explicit intents.
  4. No, intent-filter should have only one action, because a given component should not perform more than one action.
Show Answer
Share Facebook gmail Twitter
14
Is it possible to have multiple categories in an intent-filter?
  1. No, intent allows only one category
  2. Yes, but intent should have at least one action along with those categories.
  3. Yes, you can have n no of categories in it.
  4. Yes, but you should have same no of actions also along with categories
Show Answer
Share Facebook gmail Twitter
15
how to see the action which has triggered/ started a component(activity)?
  1. use getIntent().
  2. use getAction() from the intent.
  3. use getIntent() and then use getAction() from that intent.
  4. Option 3 is true, but not always. some times you don't need to get the intent specifically.
Show Answer
Share Facebook gmail Twitter
16
I want to design an android application where I take username, password and connect to the Gmail and show the status of log in to the user. Now how to design this application? How many components will be there?
  1. It needs one service with one worker thread, and one activity.
  2. it needs one service, one activity.
  3. It needs one service with multiple threads, and one activity.
  4. It needs one service with one worker thread, and only one dialog in service.
Show Answer
Share Facebook gmail Twitter
17
Where do static variables gets stored?
  1. stack
  2. heap
  3. data segment
  4. hard disk
Show Answer
Share Facebook gmail Twitter
18
how to create customized textview in android?
  1. Yes it is possible. TextView t = new TextView(this);
  2. No, you can't.
  3. Yes, extend TextView class and create your own.
  4. Yes, TextView t = findViewById(R.id.textView1);
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
20
What is the default shared preference file name, when created with getPreferences?
  1. Default.xml
  2. Settings.xml
  3. <Activityname>.xml
  4. Preferences.xml
Show Answer
Share Facebook gmail Twitter
Read more papers :