I've seen a number of questions over the years, where devs ask how they can make sure their program is the "most" whatever. The first spot in the notification tray, the first service of the startup services, the topmost of the topmost. They want to make sure that their app is first and foremost before all other apps... talk about tunnel vision.
They (or more likely, their project manager or director) would realize how ridiculous the question is, just by rephrasing the question:
How do I make my app the very <most something>, assuming another app is doing the same exact things my app is doing?
Obviously, any attempt to make sure one app is the "most" of anything opens the possibility up that two apps will try the same thing - fighting it out, struggling to become the mostest of the most. And the more aggressive the two apps become to secure that prime spot, the more they end up destabilizing the system and (inevitably) screwing over the end-user.
A Childish Approach
I mean that quite literally. I have kids, and they ask questions all the time about scenarios that benefit them alone, but when applied to everyone it's obvious the idea is unethical, or at the least unsustainable.
- Can I pick a flower from that person's garden? They have so many. Well, what if everyone picked all their flowers?
- Can I just cut to the front of the line at the amusement park, where my friends are already standing? It's just one more person, who cares? Well, what if everyone cut to the front to join their friends?
- Can I just talk over my siblings? What I have to say is really important. Well, what if everyone feels that what they have to say is the most important and starts shouting?
It's absolutely childish to feel that your application is so important that it just must have the resource it needs - whatever that might be.
A Better Approach
When you find yourself asking how your app can be the "most" whatever, think about what you're really trying to do, and how you can do it in a way that doesn't conflict with what your users may want.
- If you want your app to always be on top, why? Leave it to the user to dock it. If you need to notify them, consider toast notifications and the like.
- If you want your app icon to always show in the notification area, and as the very first icon, why? The user already installed your app. If they find it compelling to have access at a moment's notice, they'll unhide the icon themselves.
When two programs “duke it out” like this, you can’t predict which one will win, but you can predict with 100% certainty who will lose: The user.