There is no default and 100% guaranteed way to retrieve the Device ID on Android. It depends on the OS version, device brand, etc. That's why Pushlink externalizes the id generation.
However, Pushlink is designed for enterprise apps, and the developers usually control which types of Devices and OS the application will run. Don't use an ID that is changed after every uninstall/install. Try to use a long-live ID. Think and create your strategy.