Android Market Opening Notice

I want to create Notification , which when clicked opens with my application on the Android market.

I tried a few things as shown below:

NotificationCompat.Builder builder = new NotificationCompat.Builder(application); builder.setAutoCancel(true); // (set titles, icon, ...) Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("market://details?id=com.android.example")); builder.setContentIntent(PendingIntent.getActivity(application, 0, intent, 0)); Notification notification = builder.build(); NotificationManager manager = (NotificationManager) application.getSystemService(Context.NOTIFICATION_SERVICE); manager.notify(0, notification); 

However, when clicked, nothing happens. Anyone who knows how to make this work?

+7
source share
1 answer

The sent code worked. Perhaps I had problems with the HTTP version of the market link. Like http://play.google.com/store/apps/details?id=<package_name> .

+1
source

All Articles