This is what i have now. It is checking to see if GoLauncher is installed and if it is, it takes it to the go launcher main screen. If its not installed it takes user to market to have it installed.
What i need though is that if it is installed already i need to pop up a alert box showing the user how to install the theme. After user hits okay then it should go to GoLaunhcer main screen
gosetting = (ImageButton) findViewById(R.id.gosetting);
gosetting.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.gau.go.launcherex","com.jiubang.ggheart.apps.desks.diy.GoLauncher"));
startActivity(intent);
}
catch (ActivityNotFoundException e) {
AlertDialog.Builder alert = new AlertDialog.Builder(HelperActivity.this);
alert.setTitle("GO Not Found");
alert.setMessage("Do you want to vist the GO Launcher Android Market page?");
alert.setIcon(R.drawable.go_icon2);
alert.setPositiveButton("Yes",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
final Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse("market://details?id=com.gau.go.launcherex"));
startActivity(intent);
}
});
alert.setNegativeButton("No",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
return;
}
});
alert.show();
} catch (Exception go) {
go.printStackTrace();
}
}
});
Added your updated code and now getting this error.. !1