Skip to content Skip to sidebar Skip to footer

Android Studio "mobile" And "wear" Project Modules, Shared Components Location

In my Android Studio project there are two android modules 'mobile' and 'wear', these seem to be the views and controllers for the types of android devices that will be able to run

Solution 1:

Take a look there: https://github.com/tajchert/SWear_Weather

I created common module that (in my case) have constant variables, and is shared between phone and Wear module.

About where to put your objects... if you expect to use same objects on Wear an mobile, put them in common project so they are automatically shared between those two (no code duplication), but if particular object is used only on mobile and there is no need in future to add him on Wear, just put him in mobile project.

Also common project can allow you to share stuff like assets (icons etc.) between mobile and Wear device.

Post a Comment for "Android Studio "mobile" And "wear" Project Modules, Shared Components Location"