Launching My Unity App from a Notification

I have written a plugin that allows me to start a service for my app done in Unity.

I am creating a notification for my app that shows up in the notification bar.

When the user taps the notification I want to launch my app.

The problem is that I think the class name for all unity apps (games normally) is com.unity3d.player.UnityPlayer.

When I create the Intent for creating the PendingIntent for launching my app you have to supply the class name. I assume that is com.unity3d.player.UnityPlayer.

The problem is what if the user has more than one app installed that is written using Unity? How will it know to launch mine and not another one?

OK so it’s an old question but the answer may interest some people.
To launch the Unity app from the notification you must use the context to get the right application to open:

so you should do:

Intent intent =context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
                 PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);
                 
                 mBuilder = new NotificationCompat.Builder(context)
                 .setContentIntent(pendingIntent)
                 .setSmallIcon(icon)
                 .setContentTitle("My Title")
                 .setContentText(message);