So, I'm building an app to copy all my messages (AND mms, WITH attachments) from iOS (iTunes backup) to Android Pie (OxygenOS).
I went through Android's SmsManager.java file, and I noticed two methods:
importTextMessage(...)
importMultimediaMessage(...)
They appear to be the ones I'm looking for, but:
SmsManager.class
fileSo, questions. Why do they appear in SmsManager.java
but not in SmsManager.class
(jetbrains decompiler)? Why aren't they documented? How can I use these methods?
EDIT: I successfully restored my backup on my OnePlus 6T. If you want a working project, see here https://github.com/let-aurn/iosmessagetoandroid.
Methods annotated with @hide are not part of the public Android API and are not designed to be used by developers. They are often internal to the class only and are subject to change across Android versions.
You can call these methods via reflection, but do so with caution as they may change or be removed. You should always check when the method appeared in the .java file, when the signature changed and if/when it got removed. Then wrap your code in Android version checks where needed.