Yes it's safe, but you need additional activities in order to have it worked. There should be root detector in your app together with ssl pinning. Because if the device is rooted, then it can bypass the ssl pinning and get the information. So first of all you need to check if the device is rooted or not.