Click to view shortcut command for eclipse I...
What is thread in Java.
Thread is a program in execution. All Java programs have at least one thread, known as the main thread, which is created...
Explanation of oops concepts
Object means a real word entity such as pen, chair, table etc.Object-Oriented Programming is a methodology or...
How to implement share via option in android
Intent i=new Intent(android.content.Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(android.content.Intent.EXTRA_SUBJECT,"Subject...
Android Tab Layout with swipe views
Click here to view cod...
Make phone call using intent in android
1. Add below permission in manifest file :
<uses-permission android:name="android.permission.CALL_PHONE" />
2....
What is jQuery ?
jQuery is JavaScript library which contains predefined methods like show(), hide() etc.
In Javascript we are required...
Prevent from android.os.NetworkOnMainThreadException
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);...
How to load pdf file in your android application
WebView webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setBuiltInZoomControls(true);
webview.loadUrl("https://docs.google.com/gview?embedded=true&url=<PDF_COMPLETE_URL>");
webview.setWebViewClient(new...
Webview in android
WebView is a view that display web pages inside your application. You can also specify HTML string and can show it inside...
How to call another activity in android?
Intent i = new Intent(getApplicationContext(), ActivityTwo.class);
startActivity(i); ...
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...
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()
...
What is Android?
Android is an open-source, linux-based operating system that is used in mobiles, tablets, televisions etc...
Are JVM's platform independent?
JVM's are not platform independent. JVM's are platform specific run time implementation provided by the vendo...
What is a JVM?
JVM is Java Virtual Machine which is a run time environment for the compiled java class file...
How to create PATH and JAVA_HOME environment variables from command prompt (cmd)
>setx JAVA_HOME "C:\Program Files\Java\jdk1.8.0"
>setx PATH "%PATH%;%JAVA_HOME%\bin...
Java 7 Features
1. Strings in Switch:
public void testStringInSwitch(String param){
final String JAVA5 = "Java...
Difference between path band classpath in Java
1).Path is an environment variable which is used by the operating system to find the executables.
Classpath is an environment...
Random String Generation in Java
import java.util.Random;
public class RandomStringGen {
private static final String CHAR_LIST =
...
Run task periodically in Java
Schedular Task :
For this functionality,
You should create a class extending TimerTask(available in java.util package)....
Concurrency API in Java
The Concurrency API introduces the concept of an ExecutorService as a higher level replacement for working with threads...
Implement google search in your android code
Use below link to view sample code :
Download Li...
Implement horizontal scrolling of listview in android
Use below link to view sample code :
Download Li...
Android Camera API
Use below link to download a code for implementing android camera api in your code :
Download Lin...
Android Permission with detailed description
A basic Android application has no permissions associated with it by default, meaning it cannot do anything that would...
Subscribe to:
Posts (Atom)