I have open the google play store using the follwing code
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=my packagename "));
startActivity(i);.
But it shows me a Complete Action View as to select the option (browser/play store). I need to open the application in playstore directly.
I have combined both Berťák and Stefano Munarini answer to creating a hybrid solution which handles both Rate this App and Show More App scenario.
Usage
Peoples, dont forget that you could actually get something more from it. I mean UTM tracking for example. https://developers.google.com/analytics/devguides/collection/android/v4/campaigns
This link will open the app automatically in market:// if you are on Android and in browser if you are on PC.
My kotlin entension function for this purpose
And in your activity
If you want to open Play Market for searching applications (for instance, "pdf"), use this: