How i can send people to my google play on click certain button ? i already did this in activity_menu.xml
<Button
android:id="@+id/ratebutton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@+id/morebutton"
android:layout_alignBottom="@+id/morebutton"
android:layout_toLeftOf="@+id/morebutton"
android:layout_toRightOf="@+id/aboutButton"
android:background="@drawable/more"
android:text="@string/rateBtn"
android:textColor="@color/White"
android:textColorHint="@color/White"
android:textSize="18sp" />
but in MenuActivity.java i couldn't know what should i do ?
Any help? Thanks
findViewById(R.id.ratebutton).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
String url = "market://details?id=<package_name>";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With