I get the errors Syntax error on token “marketrate”, VariableDeclaratorId expected after this token… Uri.parse(“https://market.android.com/details?id=com.synamegames.giveaway”);
and
Syntax error on token(s), misplaced construct(s)…startActivity(market);
private void makeDialog() {
AlertDialog.Builder about = new AlertDialog.Builder(this);
about.setMessage("About The Giveaway");
about.setPositiveButton("Rate", new DialogInterface.OnClickListener() {
Intent market = new Intent(
"android.intent.action.VIEW",
startActivity(market);
public void onClick(DialogInterface arg0, int arg1) {
//action
}
});
about.setNegativeButton("Close", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface arg0, int arg1) {}
});
about.show();
}
}
Please try this,
I had tested the code and working as per requirement..
AlertDialog.Builder about = new AlertDialog.Builder(this);
try to run the code in Main/UI Thread.