How to open google play link app when you click over image in your app

How to open google play link app when you click over image in your app

Java:

ImageView SeniarImage = (ImageView)findViewById(R.id.SeniarImage);
SeniarImage.setOnClickListener(new View.OnClickListener() {
    @Override    public void onClick(View v) {
        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=ae.gov.moccae.seniar&hl=en"));
        startActivity(intent);
    }
});

XML: 

<ImageView    android:id="@+id/SeniarImage"    android:layout_width="wrap_content"    android:layout_height="wrap_content"    android:layout_below="@+id/MoccaeAppImage"    android:layout_marginLeft="2dp"    android:layout_marginRight="2dp"    android:layout_marginBottom="2dp"    android:contentDescription="Seniar"    android:paddingRight="5dp"    android:paddingBottom="0dp"    android:src="@drawable/seniarimage" />

No comments:

Post a Comment

How to set  interstitial  ads to be show for each n seconds ? ScheduledExecutorService schedul = Executors. newSingleThreadScheduledExec...