Tuesday, September 20, 2016

TOP 20 Android Interview Questions and Answers

HI Friends!!! I am Back with some frequently asked android interview questions with
best answers.Therefore,Android techies should brush up before facing technical round
to clear round with confidence. I hope this article for freshers as well as experienced techies.


1. What is Android?

Ans: Android is a stack of software for mobile devices which has Operating System,middleware and some key applications. The application executes within its own process and its own instance of Dalvik Virtual Machine. Many Virtual Machines run efficiently by a DVM device. DVM executes java language byte code which later transforms into .dex format files.


2. What are the advantages of Android?

Ans:  The fallowing are the advantages of Android:


  1. the customer will be benefited from wide range of mobile applications to choose
  2. Features like weather details,live RSS feeds,opening screen,icon on the opening screen can be customized 
  3. innovative products like location aware services,locations of nearby convenience store etc..
  4. SQLite enables to store the data in a structured manner
  5. Support GSM telephone and Bluetooth,WIFI,3G and EDGE Technologies
  6. The development is a combination of a device emulator,debugging tools,memory profiling and plug-in for
3. How to Remove Desktop Icons and Widgets?

Ans:  Press and Hold icon or widget, then the phone will vibrate and on the bottom of the phone you will see an option to remove. while still holding the icon or widget drag it to the remove button. Once remove turns red drop the item and it is gone

4. Describe a real time scenario where android can be used?

Ans:  Imagine a situation that you are in a country where no one understands the language you speak and you can not read or write. However, you have mobile phone with you. By that time it is very helpful to communicate

5. How to select more than one option from android list in android XML file?

Ans:  just simple, Specify android id,layout height and width.







6.  What is the Guardian app for android?

Ans:  The Guardian app for Android delivers all the best content from guardian.co.uk to your phone or tablet. Read the latest news,sport,comment and reviews,watch video,listen to brodcasts and browse stunning picture galleries while on the move.

7. What if my App uses location API,and service provider API, and service Provider shuts that off,can they?

Ans: They can do that? it's not a perfect world. Rather than having us dictate what carries and OEM's support,we let developers develop killer apps that will require it. we want to ensure all the application development that goes on for Android. We want to give OEMs an incentive to keep things open. It's a positive , self fulfilling vision.

8. How to add sections to my favorites?

Ans: It is possible to add sections,topics and contributors to your  favorites. You can add to favorites by tapping the star icon in the top right hand corner of the relevant screens,or on the right hand side of the headers in the all sections menu.

9.  Why would i choose an Android phone over iPhone?

Ans:  Well, for a variety of reasons? although i should point out that i am actually a fan of both operating systems.One reason to go the Google way is that Android phones boast tight integration with Google services like Gmail,Google Calendar, Google Contacts and Google Voice? Perfect for anyone who uses Google for all their e-mails,contacts and events.Indeed,one of the coolest things about android phones is that the first time you fire one up,you enter your Google user name and password,and voila: All your Google messages,contacts and other info start syncing into your new handset automatically, no desktop syncing needed. Android is also far more open when it come to applications. Whereas apple takes a "walled garden" approach to its app store, Google won't restrict you from installing apps that aren't featured in its official android marketplace.iPhone users,on the other hand, must "jailbreak" their phones if they want to install apps that weren't approved by apple for inclusion in the App Store.

10. How many apps are available for Android?

Ans: About 70,000 or so, growing by the day? still just a fraction of the 225,000 plus apps in the Apple app Store,but the official Android marketplace has quite the head of steam,not to mention plenty of good will from the developer community given that Google doesn't give apps the star chamber treatment.


11. Can you deploy executable JARs on Android? which packaging is supported by Android?

Ans: No. Android platform does not support JAR deployments. Applications are packed into Android package(.apk)using Android Asset Packaging Tool(aapt)and then deployed on to android platform. Google provides android development tools for Eclipse that can be used to generate Android Package.

12. How does Android System track the applications?

Ans:  Android system assigns each application a unique ID that is called Linux user ID. This ID is used to track each application.

13.  How can two Android applications share same Linux User ID and share same VM?

Ans: The applications must sing with same certificate in order to share same Linux user ID and share same VM.

14.  What is Dalvik?

Ans:  The name of Android's virtual machine. The Dalvik VM is a interpreter-only virtual machine that executes files in the Dalvik Executable(.dex)format,a format that is optimized for efficient storage and memory mappable execution. The virtual machine is register based , and it can run classes compiled by a java language compiler that have been transformed into its native format using the included .dx tool. The VM runs on top of posix-compliant operating systems,which it relies on for underlying functionality. 


15. Android application can only be programmed in java?

Ans: False. You can program android apps in C/C++ using NDK.


16.  How do i find and download updates to the E.ON android applications?

Ans: any updates to our app will appear on your notification menu at the top of your screen. just tap on the E.ON app icon and you will be taken into the android market and be presented with E.ON app download page.

17. How will you record a phone call in android? or how to handle an audio stream for a call in android?

Ans: Permission: PROCESS_OUTGOING_CALLS: will allow an application to monitor,modify,or abort outgoing calls. So using that permission we can monitor the phone calls.

18.  What is an DDMS?

Ans: Dalvik Debug Monitor Service, a GUI debugging application shipped with the SDK. It provides screen capture,log dump,and process examination capabilities.

19. How many ways data stored in Android?

Ans: 1. SharedPreferences
          2. internal storage
          3. External storage
          4. SQLite Database
          5. Network Connection

20. How to send SMS in android? Explain with Example?

Ans: SMS messaging is one of the basic and important applications on a mobile phone. Now a days every mobile phone has SMS messaging capabilities,and nearly all users of any age know how to send and receive messages,mobile phones come with a built-in SMS application that enables you to send and receive SMS messages. If you want to send SMS programmatically then fallow steps.

Take a button on activity_main.xml file as fallows.

<Button android:id="@+id/btnSendSMS"
     andriod:layout_width="wrap_content"
     android:layout_centerHorizontal="true"
     android:layout_centerVertical="true"
     android:onClick=?sendmySMS?android:text="sendSMS"/>

According to above code when user clicks the button sendmySMS method will be called.sendmySMS is user defined method.

In the AndroidManifest.xml file, add the fallowing statements:

<uses-permissionandroid:name=?android.permission.SEND_SMS?/>

Now we write the final step:
Write the given below method in MainActivity.java file:

public void sendmySMS(View v)
{
SmsMangersms=SmsManager.getDefault();
sms.sendTextMessage("5556"null,"Hello from lucky"null,null);
}
In this example i have used two emulator. On the first android emulator(5554),click the Send SMSbutton to send SMS message to the second emulator(5556).

Describe the SmsManager class in android:

SmsManager class is responsible for sending SMS from one emulator to another or device.
You can not directly instantiate this class; instead, you call the getDefault() static method to obtain an SmsManager object. You then send the SMS message using the sendTextMessage() method:

SmsManager sms=SmsManager.getDefault();
sms.sendTextMessage("5556",null,Hell from lucky"null,null);
sendTextMessage() method take five argument.

destinationAddress? Phone number  of the recepient.

scAddress? Service center address; you can use null also.
text? Content of the SMS message that you want to send.
SentIntent? Pending intent to invoke when the message is sent.

delivery Intent? Pending intent to invoke when the message has been delivered.










1 comment:

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...