Directly edit Android java classes from a built ionic project



I have created an app and built the project for both iOS and Android. I wanted to monetise the application by way of adverts, but I haven’t really been able to find a robust way of implementing them on a high level from within the HTML5 codebase. With the iOS build, I was able to easily add the SDK to my Xcode project, and call the ads upon app launch. It works, it builds and I have been able to submit the app to the App Store with little to no stress.

Unfortunately, the same cannot be said for the android version. I have managed to build a fully signed release APK which I can now submit to Google Play, however before doing that I would like to embed the ads. My question is, can I directly edit the Java classes to call the ad methods needed to launch the ads? If so, how do I go about doing that?

Thanks in advance!


Thats not really much of an ionic issue… but more of a cordova question. I’m not sure how much support you’ll get here, you might have better luck on Stackoverflow.


mhartington is right, this question is not limited to ionic and is better suitable for stackoverflow.

However, today’s your lucky day! I have successfully embedded ads in my android app using this cordova plugin and Google AdMob. Hope this helps!


Also, a note: if the question was instead “How to add ads to an Android Ionic project?”, I think the question would have received more attention and answers!