I am creating a watch face for android wear. After creating watch face and reading this, I have generated signed apk for android wear.
But android studio is generating two signed apk: one for mobile device and another for wearable.
I want to pack my wearable app inside my mobile app so that watchface appear on companion app as shown on developer's guide.
I installed mobile-release.apk but when I open it it doesn't showing in companion app or anywhere. Can anyone help me how to install it?
Assuming you use android studio:
Your mobile build.gradle file should have the following dependency:
dependencies {
...
wearApp project(':wear')
}
Go to Build > Generate signed apk. In the first window, select mobile as your module.
Now when the build is complete, the wear module will automatically be embedded into the mobile module. The mobile apk is the one you distribute. Wear can be used for testing.
Related
I developed this react Native mobile application called "ClkApp". I Published my application using expo and I can see the application on my phone.
Now, I want to publish this application on Google play. I completed all the required steps including paid the fee of 25 dollars. One of the step requires that I generate a signed APK. I saw some tutorials how to generate the Signed APK and all of them build the application using android studio and go to Build -> Generate Signed APK. I tried to open my app on Android studio, but I don't see any option under Build menu other than "Analyze APK" and "deploy Module to app engine". there is another option called "make", but that is disabled. Below is the image:
I created a new test application using android studio and I can see the options like generate signed APK, Build etc. for this test application. I don't want to create "ClkApp", my original app", application using android studio because that will take lot of time. Is their any way, I can generate the APK on this existing application and don't have to use android studio at all.
Any help will be greatly appreciated.
Since you have build your app with Expo. You can use Expo to generate apk (standalone app)
After you configure app.json and run expo build:android
Check this for details https://docs.expo.io/versions/v32.0.0/distribution/building-standalone-apps/
I developed wear app and mobile app separate with the same package name. After that I embedded the signed wear apk to the Mobile app SDK.
After embedded when I try to run into mobile am getting an error "MISSING features watch"
For embedded am following
1. Copy the signed wearable app to your handheld project's res/raw directory
2. Create a res/xml/wearable_app_desc.xml
<wearableApp package="wearable.app.package.name">
<versionCode>1</versionCode>
<versionName>1.0</versionName>
<rawPathResId>wearable_app</rawPathResId>
</wearableApp>
Add a meta-data tag to your handheld app's application tag
Am not getting why the issue occurs.am using all the user permission which i used in the wear sdk in mobile sdk
Please help me to solve the issue
Solution 1:
I don't know whether you are giving the below feature tag in the AndroidManifest.xml file in the wearable app module. If not, please give it which will solve your problem.
<uses-feature android:name="android.hardware.type.watch"/>
Solution 2:
If you are having different flavours for your mobile app and having only one flavour for the wear app, you need to use the application id of the flavour you used in mobile app in the wear app.
For example: Say you are having two flavors for mobile app
1. com.wear.app.prod
2. com.wear.app.dev
If you are using com.wear.app.prod, the same should be used for your wear app. If you changed to com.wear.app.dev, then the application id of the wear app should be changed to com.wear.app.dev.
Note: This is for apps having only one flavour for wear app and multiple flavours for the mobile app.
in android studio beside device chose, you can chose your package, select the app , not the wear module and run the project.
I want to create an Android wearable app on Android studio. I have installed the apk file on mobile to test run it. I would like to know how I can run the same apk on wearable device.Also, apk file created on Studio is different for wearable and mobile devices. How can we run it? Thanks in advance!
As it mentioned at official website you need to create special package signed by release key. See more info about packaging here.
When developing, you install apps directly to the wearable like with handheld apps. Use either adb install or the Play button on Android Studio.
Note: The automatic installation of wearable apps does not work when you are signing apps with a debug key and only works with release keys.
During the development period, do not use release key for signing. Instead, you should build your app which would result in two apks, one for the phone and one for the wear device. Then install each of them separately on the corresponding device using adb or Android Studio. Make sure you are using the same package names for both apks.
When you are done with your development, then build the app with your release key; then the wear apk will be embedded inside your phone apk and installation of your phone apk on a phone will result in the installation of the embedded wear apk on the wear device (make sure you remove the dev apks from both devices prior to this step otherwise installation will fail due to different keys).
Trying to debug through Android Studio as suggested by Julia and Ali, but it is always showing me Parse error while installing or running the code.
I have created a project for both mobile and wear. While running for mobile it works fine in the mobile device but while running the code in the wear it always shows Parse error.
I am using Moto 360 for running and debugging.
In Android Studio we have two folders
Mobile
Wear.
So which apk should I install on my smartphone, which would sync the corresponding setup to the Android Wear?
DEBUG :
You can install the Mobile apk on smartphone and Wear on your smartwatch, with ADB & plugged into USB
RELEASE :
Just install the Mobile apk on smartphone, this will sync to your wear
So which apk should I install on my smartphone, which would sync the
corresponding setup to the Android Wear?
That's true only when the apk is exported and signed with the production certificate. When you develop, you have to explicitly install the apk, on both devices. You just need to switch between the wearable and handheld application on AndroidStudio, in the drop down menu next to the run button, and choose the device, in the popup which prompt the attached devices
Easiest way to install wearable apk :
Make sure your package name of wearable and mobile are same.Go to AndroidManifest .xml file both these module and check whether these are same or not. If same then ok otherwise you have make them same.
Normally, There two apk's are available in wearable project one is "Mobile APK" and another is "Wearable APK".
We have to build signed apk for "Mobile apk". If any one doesn't know how to build signed apk you ca see this video - Click here
When APK build successfully you can find it in "Your_Project\mobile" folder.
Then send it to your phone which is connected to wearable device.
Then install it on your mobile.
When the handheld app will connect with the wear, it will install/update the wear-apk on the wearable device.
The mobile app can be empty, without Activities, but you have to declare the same package in AndroidManifest for both.
Hy I am trying to package the wearable app using Android studio 1.0.1 and I am following the steps given on this link https://developer.android.com/training/wearables/apps/packaging.html and I followed the steps over 3 successfully . but when go for 4th step , that is to click the Build menu on AS and to click the signed apk , but after that I got a selection box , weather to sign the mobile apk or to sign the wear app.
Now this is a point which is confusing for me , Should I go for Mobile app and It is all done and I would be able then to install the app on mobile and it will push the wear app to wearable or should I first signed the wear app and then paste this signed app in the mobile app and then select the sign mobile app , ??? what should I do to make it work
I think that my question is quite clear now. waiting for help
You have to simply create a module of your wear app with the same applicationId. In addition you add to your gradle script file of your mobile app:
dependencies {
//something bla bla
wearApp project(':mywearable')
}
Generete from Android Studio menu your release APK for your mobile app. You'll see actually that two apk are generated, the mobile and the wear apk but it's only a convenience for you. If you check the mobile apk you'll see the wear app inside, so don't worry use always to publish the mobile apk.
You should build and sign your just mobile application. Wearable aplication will be signed automatically and introduced inside mobile .apk
You could check this opening the .Apk generated as a .zip. Wear apk will be in res/raw/ folder.