 java.lang.NullPointerException 
<p>CustomDialogExample.java</p>

<pre><code>public class CustomDialogExample extends Activity {
     /** Called when the activity is first created. */


        @Override
        public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           /** Display Custom Dialog */
           CustomizeDialog customizeDialog = new CustomizeDialog(this);
           customizeDialog.show();
        }
    }
</code></pre>

<hr>

<p>CustomizeDialog.java</p>

<pre><code>public class CustomizeDialog extends Dialog implements OnClickListener {
Button okButton;

public CustomizeDialog(Context context) {
super(context);
/** 'Window.FEATURE_NO_TITLE' - Used to hide the title */
requestWindowFeature(Window.FEATURE_NO_TITLE);
/** Design the dialog in main.xml file */
setContentView(R.layout.main1);
okButton = (Button) findViewById(R.id.OkButton);
okButton.setOnClickListener(this);
}


@Override
public void onClick(View v) {
/** When OK Button is clicked, dismiss the dialog */
if (v == okButton)
dismiss();
}

}
</code></pre>

<p>this is code of my activity to which i want to call from service ....</p>
