When I click on any Google Play Services API, or Firebase API that I'm using in my android project in Android Studio, the IDE takes me to a decompiled version of the class where the variable names are obfuscated and there are no docs on any of the methods. Any ideas how to see the docs directly in the IDE?
I suspect the reason is that play services and firebase services are not open source and I'm ok with not seeing the impls, I understand they want to protect that. But I'd really benefit from seeing the docs directly in the IDE rather than alt-tabbing to a browser. Thanks for your help.
Javadocs really should be distributed with the client libraries. We have an open issue within Google on this, but I have no timelines on when a proper solution will be available. However, I can give you a workaround that you can apply to your project. It's not a great solution, but it's something.
On my OSX machine, the Android SDK is installed here:
/Users/[myusername]/Library/Android/sdk
And the local copy for Play Services and Firebase javadocs are here (yours may vary):
/Users/[myusername]/Library/Android/sdk/extras/google/google_play_services/docs/reference/
You can actually attach this path to your Firebase client libraries in Android Studio with this procedure:
Now, when you summon javadoc for classes in that library, you'll see it. However, you'll have to do this for every library where you want javadoc.
If you don't have local javadocs installed for some reason, you can attach the remote url for the javadoc. For that, use the plus button with the little earth under it, and paste the javadoc url. For Firebase, that's https://firebase.google.com/docs/reference/android and for Play Services, that's https://developers.google.com/android/reference/
It's not great to do all this manual work, but at least it gets you javadoc in your IDE.
If you want to write a script to attach this for everything you use, know that this procedure essentially just modifies files under .idea/libraries. You can pretty easily observe the javadoc XML element that gets modified when you make changes in the IDE, and you can script/edit changes there yourself if you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With