All java c# asp.net .net servlet jdbc c sqlserver android ado.net javascript php wcf clearcase angularjs 2

What folders are importent in android project?

  • AndroidManifest.xml
  • build.xml
  • bin/
  • src/
  • res/
  • assets/

Every Android project structure includes the following list of sub-folders.

1. src
2. gen
3. Android version(such as Android 2.2)
4. assets
5. res

What is drawable folder in android?

A compiled visual resource that can used as a backgrounds,banners, icons,splash screen etc.
By default Android maintain three folders for the images with different resolution reason behind it is the use or the resolution of the Android Device on which the application gonna execute. hdpi image folder maintain images for the Android Broad Screen set or Android Phones with the Higher resolution. ldpi for Lower images quality which supports by the earlier sets of the android mdpi for medium images support xhdi images folder for devices with maximum resolution. Android OS select the image it self by checking the compatible device and its resolution. Hope it helps. Accept if you get your explanation.

What is ADB in android?

It is acts as bridge between emulator and IDE, it executes remote shell commands to run applications on an emulator
adb is Android Debug Bridge. To restart adb by command line: adb kill-server adb start-server To restart adb in Eclipse: Window > Show View > Other... > Android/Devices When the view is showing: View Menu of "Devices" > Reset adb

Android Debug Bridge

This is the literal meaning of ADB. Though at first glance it doesn’t appear to tell you anything, it actually does. It’s a “bridge” for developers to work out bugs in their Android applications. This is done by connecting a device that runs the software through a PC, and feeding it terminal commands. ADB lets you modify your device (or device’s software) via a PC command line.

If command line syntax confuses or intimidates you, have no fear. For most average users, the only time you’ll need to use ADB is when you have step-by-step instructions in front of you.

What things should be kept in mind while creating your own exceptions in Java?

While creating your own exception -

  1. All exceptions must be a child of Throwable.
  2. If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception class.
  3. You want to write a runtime exception, you need to extend the RuntimeException class.

Required files
Client.java [ My business logic will goes here ]
MyOwnExceptionClass.java  [ This is our own Exception class ]

  1. All exceptions must be a child of Throwable.
  2. If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception class.

Why can't you run java byte code on Android?

Android uses DVM (Dalvik Virtual Machine ) rather using JVM(Java Virtual Machine), if we want, we can get access to .jar file as a library.

That's because Android uses Davik Virtual Machine and not traditional JVM. The class file i.e the byte code for Android is first optimized even more to make it mobile friendly (Which usually has a custom format according to specifications of Dalvik VM),which differs from normal bytecode.Hence direct JAVA bytecode wont't run.
 

That's because Android uses Davik Virtual Machine and not traditional JVM. The class file i.e the byte code for Android is first optimized even more to make it mobile friendly (Which usually has a custom format according to specifications of Dalvik VM),which differs from normal bytecode.Hence direct JAVA bytecode wont't run.

What are the type of flags to run an application in android?

  1. FLAG_ACTIVITY_NEW_TASK
  2. FLAG_ACTIVITY_CLEAR_TOP.
  • FLAG_ACTIVITY_NEW_TASK – This starts the activity in a new task. If it’s already running in a task, then that task is brought to the foreground and the activity’s onNewIntent()method receives the intent (this is the same as using singleTask in the manifest)
  • FLAG_ACTIVITY_SINGLE_TOP – In this case, if the activity is currently at the top of the stack, then its onNewIntent() method receives the intent. A new activity is not created (this is the same as using singleTop in the manifest).
  • FLAG_ACTIVITY_CLEAR_TOP – Here, if the activity is already running in the current task, then this activity is brought to the top of the stack (all others above it are destroyed) and its onNewIntent() method will receive the intent. There is no launchMode equivalent for this flag.
"standard" "singleTop" "singleTask" "singleInstance" The default mode is "standard".

How does android track the application on process?

Android provides a Unique ID to all applications is called as Linux ID,this ID is used to track each application.
The following links should help you figure out how to programmatically determine the data usage per application. cw-andtuning/TrafficMonitor (GitHub) Create a network monitor using Android's TrafficStats class Android Traffic Statistics Inside

Which kernal is used in android?

Android is customized Linux 3.6 kernel.

Kernel is just a component of the Android operating system. It is actually a Linux kernel. The rest of operation system contains other components with their own versions as well such as the Android runtime, standard C libraries and other utilities and tools. All of these combined for the Android operating system which has its version as well. 

For the purposes of application compatibility, you need to be looking at the Android operating system version and/or the Android API level.

How many dialog boxes do support in android?

AlertDialog, ProgressDialog,DatePickerDialog, and TimePickerDialog

Android supports 4 dialog boxes:

AlertDialog : 
An alert dialog box supports 0 to 3 buttons and a list of selectable elements, including check boxes and radio buttons. Among the other dialog boxes, the most suggested dialog box is the alert dialog box.

ProgressDialog : 
This dialog box displays a progress wheel or a progress bar. It is an extension of AlertDialog and supports adding buttons.

DatePickerDialog : 
This dialog box is used for selecting a date by the user.

TimePickerDialog : 
This dialog box is used for selecting time by the user.

How to read name of all parameters in servlet?

getParameterNames() method of HttpServletRequest returns complete list of all parameters in the current request. This method returns an Enumeration that contains the parameter names in an unspecified order. Once we have an Enumeration, we can loop down the Enumeration in the standard manner, using hasMoreElements() method to determine when to stop and using nextElement() method to get each parameter name.

To obtain parameter name from servlet request. By calling request.getParameterNames() you will get an enumeration object by iterating this object you can get the parameter names.When you call the servlet and pass some parameters you get the parameter name echoed on the web browser.