Rambou
Rambou

Reputation: 1058

Android Studio (wear + mobile) app in same project

I would like my android app to work in android wear too. I'm using android studio as IDE.
So what do I do for my app to work in android wear? Do I create another project? If so, will it share the same layouts and classes or will it be a whole other app? I mean, do I need to create two different apps for mobile and wear?

Upvotes: 3

Views: 3119

Answers (4)

Saurabh Rajput
Saurabh Rajput

Reputation: 11

Select and Go with the android wear activity and in the next window showing Configure your project, Check the Pair with Empty Phone App then it will automatically configure it for android phone and wear.

Upvotes: 1

aminator
aminator

Reputation: 481

old) In older versions of Android Studio you could select the different platforms for which a module was required during creation of the project.

new) In the current versions of Android Studio you have to just one platform and add the modules for additional platforms after creation of the project.

old) old version of Android Studio

new) current version of Android Studio

Upvotes: 0

Jeffrey Blattman
Jeffrey Blattman

Reputation: 22637

if you create a wear project, it automatically create "app" and "wear" modules. when you assemble, the wear APK gets embedded in the app APK. that's how it works.

Upvotes: 0

bjiang
bjiang

Reputation: 6078

You need use Android Studio creates a new project with two modules, mobile and wear. You now have a project for both your handheld and wearable apps that you can create activities, services, custom layouts, and much more in. On the handheld app, you do most of the heavy lifting, such as network communications, intensive processing, or tasks that require long amounts of user interaction. When these are done, you usually notify the wearable of the results through notifications or by syncing and sending data to the wearable.

For more details, please refer to here.

Upvotes: 1

Related Questions