Reputation: 605
I want to launch my app's details page using market application by clicking a image button on the app widget. I tried it using following code after referring this link http://developer.android.com/guide/publishing/publishing.html#marketintent
intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market.android.com/details?id=com.abc.abcdef"));
pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
views.setOnClickPendingIntent(R.id.rateme, pendingIntent);
But everytime I clicked on the image button on the widget I get following message in logcat
Starting activity: Intent { act=android.intent.action.VIEW dat=market.android.com/details?id=com.abc.abcdef flg=0x10000000 bnds=[22,243][166,385] } from pid -1
without any success of launching market application. If any one have a solution for this problem, please share it with me. Thanks, SKU
Upvotes: 2
Views: 1269
Reputation: 9753
Try this for your setData()
:
intent.setData(Uri.parse("market://details?id=com.abc.abcdef"));
http://developer.android.com/guide/publishing/publishing.html#OpeningDetails
Upvotes: 2