Notification For Android

Notification are used for Background task interaction with user. When you want to download , upload data to/from server . And you want to do other task in android phone then use notification manager helper class to provided time to time update for user to get the process state. We create you helper class hope … Read more

SQlLite For Android

Here we add Sqlite Helper class. Which you can used an any project for permanently storage of necessary data. Customize it on base of your requirment. package com.example.smartftpclient; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class SqliteDataBase { private static final String DATABASE_NAME = “data”; private static final String … Read more

GLSurfaceView in android

It used for 2D and 3D Graphic animation , gaming and all those app which required 2D or 3D Graphic Here we Simply Introduce skeleton of GLSurfaceView. Create New Project The Activity Class Look like the following public class GLActivity extends Activity  {    @Override    protected void onCreate(Bundle savedInstanceState) {                 super.onCreate(savedInstanceState); … Read more

How to restore Deleted file in Eclipse

When you develop App and unfortunately some file are deleted from you and you want to recover at the used the following procedure To to Navigation Menu Select Open Resources Then Enter file or Project name which you want to restore. Click on Open Button  Now you File/Project are opened for you . Let Enjoy………….

Android Manifest File

It is the main Configuration file of Android Project. Is automatically created with every android project. In this file we configure different type of appliction setting. First We use element. In this tag we take permission of others appliction are services which we want to use in our appliction. if we want to use SMS … Read more

How to store data in share preferences in android

Share Preferences are used for storing some data, like font size, background color are array data. Its also store float , integer, string and Boolean values. Following are the example of Share Preference read and writing. private SharedPreferences myPrefs; private SharedPreferences.Editor editor; /////////////////////////// object initialization   myPrefs = this.getSharedPreferences(“myPrefs”, MODE_WORLD_READABLE);         editor=myPrefs.edit();  ////////////// store data in … Read more

Thread in Android

By default every android application is separate thread which called main thread. If any one want to run any work which take more than ten second and run at in the main thread . then your application must to terminated unexpectedly . To avoid this problem you must create second thread and do the long … Read more

Blocking Incomming Calls in Android Smart Phone

We want to blocks all incomming calls in android phone. Create new project and extand it main class from BroadCast Receiver. public class Blocker extends BroadcastReceiver { private ITelephony telephonyService; private String incommingNumber; private String incommingName=null; @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub Bundle b = intent.getExtras(); String state … Read more

Timer in Android

public class Timer extends Activity { private TextView tv; private int cc=0; private java.util.Timer timr; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_timer); tv=(TextView) findViewById(R.id.textView1); timr=new java.util.Timer(); timr.scheduleAtFixedRate(new TimerTask() { @Override public void run() { // TODO Auto-generated method stub TimerMethod(); } }, 0, 1000); } public void TimerMethod() { this.runOnUiThread(new Runnable() { public void … Read more