Wednesday, 26 August 2015

Write two advantag and disadvantage of Agile and water fall model?

Waterfall model advantages:
  • This model is simple and easy to understand and use.
  • It is easy to manage due to the rigidity of the model – each phase has specific deliverables and a review process.
  • In this model phases are processed and completed one at a time. Phases do not overlap.
  • Waterfall model works well for smaller projects where requirements are very well understood.

Waterfall model disadvantages:

  • Once an application is in the test stage, it is very difficult to go back and change something that was not well-thought out in the concept stage.
  • No working software is produced until late during the life cycle.
  • High amounts of risk and uncertainty.
  • Not a good model for complex and object-oriented projects.
  • Poor model for long and ongoing projects.
  • Not suitable for the projects where requirements are at a moderate to high risk of changing.

Advantages of Agile methodologies:

  • Customer satisfaction by rapid, continuous delivery of useful software.
  • People and interactions are emphasized rather than process and tools. Customers, developers and testers constantly interact with each other.
  • Working software is delivered frequently (weeks rather than months).
  • Face-to-face conversation is the best form of communication.
  • Close, daily cooperation between business people and developers.
  • Continuous attention to technical excellence and good design.
  • Regular adaptation to changing circumstances.
  • Even late changes in requirements are welcomed
 Disadvantages of Agile methogologies:

  • In case of some software deliverables, especially the large ones, it is difficult to assess the effort required at the beginning of the software development life cycle.
  • There is lack of emphasis on necessary designing and documentation.
  • The project can easily get taken off track if the customer representative is not clear what final outcome that they want.
  • Only senior programmers are capable of taking the kind of decisions required during the development process. Hence it has no place for newbie programmers, unless combined with experienced resources.




Saturday, 22 August 2015

Is it okay to change the name of an application after its deployment?

How can two Android applications share same Linux user ID and share same VM?

When does Android start and end an application process?

How does an application run in isolation from other applications?

How does Android system track the applications?

What are Dalvik Executable files?

Can you deploy executable JARs on Android?

Why cannot you run standard Java bytecode on Android?

What is the difference between checked and unchecked exception?

What is the difference between a fragment and an activity? 

What is DDMS? Describe some of its capabilities.

What is ADB?

ADB stands for Android Debug Bridge. It is a command line tool that is used to communicate with the emulator instance.

Android Debug Bridge (adb) is a versatile command line tool that lets you communicate with an emulator instance or connected Android-powered device. It is a client-server program that includes three components:


  • A client, which runs on your development machine. You can invoke a client from a shell by issuing an adb command. Other Android tools such as the ADT plugin and DDMS also create adb clients.
  • A server, which runs as a background process on your development machine. The server manages communication between the client and the adb daemon running on an emulator or device.
  • A daemon, which runs as a background process on each emulator or device instance.

What is ANR?

ANR stands for Application Not Responding. It is a dialog box that appears if the application is no longer responding.


Friday, 21 August 2015

What are the code names of Android?


  1. Aestro
  2. Blender
  3. Cupcake
  4. Donut
  5. Eclair
  6. Froyo
  7. Gingerbread
  8. Honycomb
  9. Ice Cream Sandwitch
  10. Jelly Bean
  11. Kitkat
  12. Lollipop


Does android support other language than java?

Yes, android app can be developed in C/C++ also using android NDK (Native Development Kit). It makes the performance faster. It should be used with android SDK.



More details read discussion at:
http://stackoverflow.com/questions/1994703/which-programming-languages-can-i-use-on-android-dalvik

What are the life cycle methods of android activity?

There are 7 life-cycle methods of activity. They are as follows:

onCreate()
onStart()
onResume()
onPause()
onStop()
onRestart()
onDestroy()


  1. onCreate() This is the first callback and called when the activity is first created.
  2. onStart()         This callback is called when the activity becomes visible to the user.
  3. onResume() This is called when the user starts interacting with the application.
  4. onPause()  The paused activity does not receive user input and cannot execute any code and called when the current activity is being paused and the previous activity is being resumed.
  5. onStop() This callback is called when the activity is no longer visible.
  6. onDestroy() This callback is called before the activity is destroyed by the system.
  7. onRestart() This callback is called when the activity restarts after stopping it.




What are the core building blocks of android?

The core building blocks of android are:


  • Activity
  • View
  • Intent
  • Service
  • Content Provider
  • Fragment

What is implicit intent in android?

Implicit intent is used to invoke the system components.

Implicit Intent doesn't specify the component. In such case, intent provides information of available components provided by the system that is to be invoked.

For example, you may write the following code to view the webpage.

Intent intent=new Intent(Intent.ACTION_VIEW);  
intent.setData(Uri.parse("http://www.google.com"));  
startActivity(intent);  


Implicit Android Intents is the intent where instead of defining the exact components, you define the action you want to perform. 
The decision to handle this action is left to the operating system. The OS decides which component is best to run for implicit intents.

Let us see an example:

    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);


This is a simple example of an share Android Intent. This is typically used when you want to share the data from 1 application to another. Sharing data over email, sms, social network etc. is a classic example of this category. See the image below, this is a implicit intent for sending email.


What is JVM?


A Java virtual machine (JVM) is an abstract computing machine that enables a computer to run a Java program.

JVM is a platform-independent execution environment that converts Java bytecode into machine language and executes it.

JVMs are available for many hardware and software platforms (so JVM is platform dependent).


The Java Virtual Machine is responsible for interpreting Java bytecode, and translating this into actions or operating system calls.
For example, a request to establish a socket connection to a remote machine will involve an operating system call. Different operating systems handle sockets in different ways - but the programmer doesn't need to worry about such details.  It is the responsibility of the JVM to handle these translations, so that the operating system and CPU architecture on which Java software is running is completely irrelevant to the developer.

What is the actual use of interface in Java?


How to get application version programmatically in android?

PackageManager manager = context.getPackageManager();
PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0);
String version = info.versionName;

How to display HTML in TextView?

You need to use Html.fromHtml() to use HTML in your XML Strings. Simply referencing a String with HTML in your layout XML will not work.

For example:
myTextView.setText(Html.fromHtml("<h2>Title</h2><br><p>Description here</p>"));





How to run/install/debug application over Wifi?

What is difference between a view's padding and margin?

Padding is for inside/within components. Eg. TextView , Button, EditText etc.
Eg. space between the Text and Border

Margin is to be applied for the on-outside of the components.
Eg. space between left edge of the screen and border of your component

Padding is inside of a View.

Margin is outside of a View.


What permission do i need to access Internet from an android application?

What does android:layout_weight means?

How to avoid reverse engineering of an APK file?

That is impossible, sorry.

However ProGuard, properly configured, will obfuscate your code. DexGuard, a commercial extended version of ProGuard, may help a bit more. However, your code can still be converted into smali, and developers with reverse-engineering experience will be able to learn what you do from that smali code.

100% avoidance of reverse engineering of the Android APK is not possible, but you can use ProGuard to obfuscate application code.

How to send an object from one Android Activity to another using Intents?

How can you pass data between activities in Android?

How to declare global variables in Android?

What is the most robust way to get user's current location in Android?

How can i open a URL in Android's web browser from my application?

How can i obtain the crash-data from my Android Application?

How can i discover memory usage of my application in Android?

What is Context in Android?

Is there a way to get the source code from an APK file?

What is the difference between match_parent and fill_parent?

They're the same thing (in API Level 8+). Use match_parent.


FILL_PARENT (renamed MATCH_PARENT in API Level 8 and higher), which means that the view wants to be as big as its parent (minus padding)


fill_parent: The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.



Functionally no difference, Google just changed the name from fill_parent to match_parent, from API level 8 (Android 2.2). FILL_PARENT is still available for compatibility reason.

LayoutParams.FILL_PARENT and LayoutParams.MATCH_PARENT both have value -1. Not sure what tempted google to change from Fill Parent to Match Parent :)

Since most of the phones are >= Android 2.2 .. you should use Match Parent for future compatibility... not sure when they will discontinue the older Fill Parent constant!

What is the most common case when you get android.os.NetworkOnMainThreadException ?

Is there a way to run Python on Android?

Is there a unique Android Device ID?

How you can close/hide the Android Soft Keyboard?

How you can save the Activity state in Android?

How can we speed up the android emulator?

Why is Android Emulator so slow?

What is the difference between px, dp, dip and sp in Android?

What is difference between Service and Thread in Android?

Thursday, 20 August 2015

What is NDK?

What is fragment?

What is content provider?

Content providers are one of the primary building blocks of Android applications, providing content to applications.

They encapsulate data and provide it to applications through the single ContentResolver interface. A content provider is only required if you need to share data between multiple applications.

For example, the contacts data is used by multiple applications and must be stored in a content provider. If you don't need to share data amongst multiple applications you can use a database directly via SQLiteDatabase.


Content providers are used to share information between android applications.




What is AAPT?

AAPT stands for Android Asset Packaging Tool.

This tool is part of the SDK (and build system) and allows you to view, create, and update Zip-compatible archives (zip, jar, apk). It can also compile resources into binary assets.

What is the name of database used in android?

SQLite: An opensource and lightweight relational database for mobile devices.



SQLite is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation.

SQLite supports all the relational database features.

What is service in android?

A service is a component that runs in the background. It is used to play music, handle network transaction etc.

A Service is an application component that can perform long-running operations in the background and does not provide a user interface.


How to call another activity in android?

Intent intent = new Intent(context, AnotherActivity.class);
    startActivity(intent); 

What is explicit intent in android?

What is intent?

It is a kind of message or information that is passed to the components. It is used to launch an activity, display a web page, send sms, send email etc.

There are two types of intents in android:

  • Implicit Intent
  • Explicit Intent

Intent is basically a message that is passed between components (such as Activities, Services, Broadcast Receivers, and Content Providers).

Intents are a way of telling Android what you want to do. In other words, you describe your intention.

What is activity?

What are the advantages of android?

Open-source: It means no licence, distribution and development fee.

Platform-independent: It supports windows, mac and linux platforms.

Supports various technologies: It supports camera, bluetooth, wifi, speech, EDGE etc. technologies.

Highly optimized Virtual Machine: Android uses highly optimized virtual machine for mobile devices, called DVM (Dalvik Virtual Machine).

Who is the founder of Android?

Andy Rubin

https://en.wikipedia.org/wiki/Andy_Rubin

What is Android?

Android is an open-source, Linux based operating system that is used in mobiles, tablets, television etc.

What is the main benefit of using Generics?

The main objective of generics is to provide type safety and to resolve type casting problems.