This is default featured post 1 title

This is default featured post 2 title

This is default featured post 3 title

Enable Mcrypt on PHP Install in Appserv

Please follow the below steps: Add libmcrypt.dll to the System32 folder Uncommnte the include_path var in php.ini Restart Apache

Dynamic Menu in Android

import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.view.ContextMenu; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import android.widget.Toast; public class MenuDemo extends Activity { /** Called when the activity is first created. */ private Context context; Button btnMenu; @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     context = this;     LinearLayout llay = new LinearLayout(context);     btnMenu = new Button(context);     btnMenu.setText(“Show Menu”);     llay.addView(btnMenu);     setContentView(llay);     registerForContextMenu(btnMenu); } @Override public void onCreateContextMenu(ContextMenu menu, View v,ContextMenu.ContextMenuInfo menuInfo) {//Context Menu that appears when long clicked.     Menu m_menu

PhoneStateListener Example

We have to include this permission in  Manifest: <uses-permission android:name=”android.permission.READ_PHONE_STATE”/>   Add the below program to your main activity class: TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); tm.listen(mPhoneListener, PhoneStateListener.LISTEN_CALL_STATE); // somewhere else private PhoneStateListener mPhoneListener = new PhoneStateListener() {     public void onCallStateChanged(int state, String incomingNumber) {         try {             switch (state) {             case TelephonyManager.CALL_STATE_RINGING:                 // do something…                 break;             case TelephonyManager.CALL_STATE_OFFHOOK:        

How to Create a Playlist

public void checkforplaylists(Context context) { ContentResolver cr = context.getContentResolver(); final Uri uri=MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI; final String id=MediaStore.Audio.Playlists._ID; final String name=MediaStore.Audio.Playlists.NAME; final String[]columns={id,name}; final Cursor playlists= cr.query(uri, columns, null, null, null); if(playlists==null) { Log.e(TAG,”Found no playlists.”); return; } Log.e(TAG,”Found playlists.”); return; }