But when I am talking in a conference or something, I think that this could be insulting to senior professors etc.
You are correct; it would be.
Unless you're actually the organizer of the conference, it really isn't your place to make such announcements. You could, however, contact the organizer ahead of time and request that they include a note in the materials or perhaps make a brief announcement in opening remarks requesting people to be respectful with the use of their mobile devices during talks. But whether such an announcement is made or not is really their call, not an individual speaker's.
The absolute most I would do on your own is perhaps including a note at the bottom of your title slide with something like this:
Please silence your mobile devices.
I don't think many people will take offense at that, but anything more than that will likely be seen as insulting or condescending, as you've guessed.
(Image source: website offering free icons for such uses.)
As a side note, I'd recommend trying not to take offense at people merely using their phone, so long as they're not making noise or otherwise being disruptive or distracting to others. It's possible that they're merely taking notes about your talk. It's also possible that they have some other important matter that might require immediate attention.
Of course, it's also possible that they simply aren't as interested in your talk as they had hoped that they'd be from the abstract or that they're interested in parts of your presentation, but not in others. Different people are interested in different things and there are very few things that everyone will find interesting. It's unlikely that you'll have many cases where everyone in the audience is equally interested.
You don't really have any way of knowing whether any of those things are the case. In any event, none of those cases necessarily reflects poorly on you or the subject of your talk. I'd recommend just trying to ignore them as best you can and continue with the talk for the sake of the parts of the audience that are actually interested in it.
Please resist the temptation to treat your audience like children (unless, of course, your audience actually is children.) Professionals at a conference won't appreciate feeling that a speaker is treating them with condescension.