Note that v7 NotificationCompat was deprecated in API level 26, and that v4 was expanded a bit. If your compileSdk is 26+, you must use v4.
As you can see in the docs, v7 inherits from v4 and then adds some more functionality.
android.support.v7.app.NotificationCompat
An extension of NotificationCompat which supports NotificationCompat.MediaStyle. You should start using this variant if you need support for media styled notifications.
v7 can do everything v4 can. The only difference is that v7 also supports .MediaStyle
, while v4 does not.
Regarding lock screen, there are some constants that define how they work, e.g. if they are shown or not:
VISIBILITY_PRIVATE, VISIBILITY_PUBLIC and VISIBILITY_SECRET