Juro
Juro

Reputation: 119

Android - Can I call a function of the app in the module?

First : app called Module's Activity Second : Module want to Call app's Method

Example:)

Upvotes: 0

Views: 811

Answers (1)

Evyatar Cohen
Evyatar Cohen

Reputation: 352

For your module to recognize your app (also a module). yo need the add this line in your dependencies (in your module gradle):

implementation project(':app')

After adding this line your module will be able to use your public class from 'app module'

Or

you can make your 'com.example.myapplication.calcurate' as library and then add the arr file to your module and use it

Upvotes: 1

Related Questions