0% found this document useful (0 votes)
148 views3 pages

Android Interview Questions and Answers Part 5

Android uses many security measures to keep them away from the hackers. Android application uses sandbox that is very popular and allow limited access to the information that is very private and sensitive for the user. It also consists of user terms and agreements that also taken care of. As, android is open source it is not fully secure but lots of security issues are being solved for make it more popular and bug free.

Uploaded by

Umar Atta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
148 views3 pages

Android Interview Questions and Answers Part 5

Android uses many security measures to keep them away from the hackers. Android application uses sandbox that is very popular and allow limited access to the information that is very private and sensitive for the user. It also consists of user terms and agreements that also taken care of. As, android is open source it is not fully secure but lots of security issues are being solved for make it more popular and bug free.

Uploaded by

Umar Atta
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

3/13/2014

Android interview questions and answers part 5

Android interview questions and answers part 5


Search Interview Q&A Videos Placement papers HR interview CV Cover letter GD Aptitude Current Affairs Online test MBA Bank Career options

Interview Questions Android Source Code Cheap Android Phones

Android interview questions and answers part 5

Interview questions Networking interview Basic networking Networking for freshers

Part 1 Part 2 Part 3 Part 4 Part 5

Download Networking FAQ Test Networking skills New Test SQL Server skills New Test Oracle skills New Networking notes Application layer Data link layer IP layer Ethernet Firewall Network technology Protocols Routers Security TCP layer VPN Tunneling Subneting RTP Multicasting Socket Programming Secured Socket Layer Bluetooth

27. What are the security measures that are taken to make Android secure?
Android uses many security measures to keep them away from the hackers. They have designed by making changes to the devices or installing a software service on the mobile. Android application uses sandbox that is very popular and allow limited access to the information that is very private and sensitive for the user. It allows the permissions to be set for the use of the information. The security measures that are provided by android is the use of the encryption of the messages that allow user to remain without worry about there phone security. They also consists of user terms and agreements that also taken care of. Most of the time android doesn't allow other applications to run on their system but it can be done by using different resources that are available on-line. As, android is open source it is not fully secure but lots of security issues are being solved for make it more popular and bug free.

28. Which are the different tags that are required to create reusable user interface that include the layout?
Android offers wide range of user interface widgets through which the reusable user interface can be made. It requires some buttons to be made and also allow multiple widgets to be combined using the single and reusable component. There are XML layout files that are used in which each tag can be mapped to the class instance. The tags that are used are: <requestFocus />: this allows the component to remain in focus. <merge />: merge the components and their properties into one to create a reusable component code <include />: this includes the library files and visual components of XML. This also uses <merge /> tag that can be combined with it to create the merging layout. To create the layout these are the tags that are required and essential. The XML visual components are also used to define the overall structure of the layout.

29. Write a program that shows the creation of reusable user interface that includes the layout.
The program that uses the reusable user interface including the layout is given below: <com.android.launcher.Workspace android:id="@+id/workspace" android:layout_width="fill_parent" android:layout_height="fill_parent" launcher:defaultScreen="1"> <include android:id="@+id/cell1" layout="@layout/work" /> <include android:id="@+id/cell2" layout="@layout/work" /> </com.android.launcher.Workspace> The tag that is used in this are: <include />: this is the element tag and it includes other XML layout files. It calls the layout files by using their name and including @layout. This @ defines the inclusion of layout file in the program. The same out in the example is included two times. The tag overrides some attributes that are included in the layout. The id can be added that uniquely identifies the application and the components that are used Placement practice test: Java | SAP | .NET | Oracle | Sql Server | QA | Aptitude | Networking inside it.

| All Skills

30. What are the methods to avoid memory leaks in Android?


Android applications are well bundled with the memory but they have a drawback of running lots of application that keeps in the memory to make the processing faster. The more application in the memory, the faster will be the switch between the applications. The memory leaks can be avoided by changing the context. The context is used for many operations but it is used to access the resources on android. The widgets have a context parameter in their constructors. There are mainly two types of context: either activity or application. The program is as follows: @Override protected void onCreate(Bundle state) { super.onCreate(state); TextView label = new TextView(this); label.setText("Test memory leak"); setContentView(label); } if the context is having leaks in it then the activity then there is a possibility of the leaks of memory. The leaking of the entire activity can be checked. The system will automatically create and destroy one of the activities by default. Android will reload the application by using the rotation policy. And it will keep the entire static field maintained.

31. What are the steps required to avoid context related memory leaks?
The steps that are required to check and avoid the context-related memory leaks are as follows: Never keep the long-lived references linked with the context-activity. This reference can be of the same life as the activity or can be of different length that depends on the type of activity that is getting performed on the action. Use of context-application is much better than the context-activity as it allows the application to be reused again and again and the activity

http://www.careerride.com/android-interview-questions-5.aspx

1/3

3/13/2014

Android interview questions and answers part 5

Use of context-application is much better than the context-activity as it allows the application to be reused again and again and the activity can be viewed or executed only once. The application takes less time to execute and activity can take more due to consisting of more than one application in it. Non-static inner classes should be avoided while getting used in the activity, as it doesn't control the life-cycle of the static-inner class and make some weak reference to the activities that are inside the process and getting used. There should not be relying upon the garbage collector as it is not the ultimate solution for the memory leaks that are defined.

32. What are the steps required in setting up the linkify calls intent?
Linkify is used to route the intent in an activity. This linkify allows the calls to be invoked and allow an activity to be handled. The process of executing the linkfy is as follows: linkfy is used to invoke the process in the TextView and allow the matching of the patterns to be turned into the intent links. Linkify monitors the intent links that is being selected by the user and allow it to be modified for further actions. Linkfy allows the user to select the link and when user selects it, it calls the VIEW action on the content that uses an URI that is associated with the link. Android takes the content that is represented by the URI and the data that is used. It looks for the ContentProvider component that is registered with the system and matches the URI of the content that is getting produced. If the match is found for the query done by android then the URI gets used by the ContentProvider and MIME type of data can be returned for the URI. Android uses the activity registered in the system that uses the intent-filter matching both the VIEW action and the MIME type for the data that can be linked with the URI.

Write your comment - Share Knowledge and Experience

http://www.careerride.com/android-interview-questions-5.aspx

2/3

3/13/2014

Android interview questions and answers part 5

Home | Want a Job? Submit Key Skills | Employer login | My key skills | About us | Sitemap | Contact us Copyright 2008 - 2014 CareerRide.com. All rights reserved. Terms of use | Follow us on Facebook!
Bookm ark to:

http://www.careerride.com/android-interview-questions-5.aspx

3/3

You might also like