Sending push notification to all the active users of one application

How can we send push notification to all the active users.
I tried sending notification to specific device but unable to send the notification to all the active users.
Can anyone help me with the steps?