//Obtain the UI Service ServiceReference uiServiceRef = context.getServiceReference(UIService.class.getName()); UIService uiService = (UIService)context.getService(uiServiceRef); //Check if there is an "Add contact" dialog, exported from the //current UI implementation. boolean isDialogExported = uiService.isDialogExported(UIService.DIALOG_ADD_CONTACT); if(isDialogExported) { //Obtains the "Add contact" dialog ExportedDialog configDialog = uiService .getApplicationDialog(UIService.DIALOG_ADD_CONTACT); //If the "Add contact" dialog is not currently visible, show it. if(!configDialog.isDialogVisible()) { configDialog.showDialog(); } }