Android Wear project - with an existing Android project - android

I have an existing Android app (for 4.2) written using Eclipse.
I'm exploring the possibility of adding an Android Wear component - there's part of the app which I think could work on a watch.
Reading through the docs at https://developer.android.com/training/building-wearables.html I'm unsure of what I'd need to do in order to integrate Wear into my existing project.
For example, under prerequisites it says Android Studio. Does that mean I'd need to migrate my Eclipse solution into Android Studio? Or can I build the Wear component independently?
Essentially, I'm just hoping to hear from someone who has added a Wear component to their existing Android solution so I can understand the basics of what's involved.

Android Wear is essentially very light application. The basic processing happens on the handheld device. Only user interaction functionalities such as accept, reject etc. is deplyed to the wear. Here also the processing is carried on by the handheld device.
So yes, you can include Wear to your project if it adds any value.

Related

Is it possible to embed a Unity game into a Flutter app?

I am creating an app that will require small mini-games as a menu option, and I have created these games in Unity. Ideally, I would like to embed these games into a Flutter project. I have seen tutorials on doing this with Java and Android Studio, and I need to make a decision on which platform I will be using for my internship project. I have several questions about the SDK, but I have posted them separately to keep the answers distinct (and help filter out the noise for anyone searching for these specific answers), and this is one of my main questions.
Specifically, I am following this guide: https://medium.com/#davidbeloosesky/embedded-unity-within-android-app-7061f4f473a
for Android Studio, and was wondering if something similar was possible with Flutter. I am also using Android Studio as my IDE for Flutter, but need to decide if I should stick with Java, or switch to Dart and Flutter (which actually works much better for specific UI elements I need).
If not, is there another way to package a Unity project and a Flutter application together?
You can imagine the whole Flutter app to be rendered on one view of the final native application. It can coexist with native views. So it should definitely be possible to display a native Android/iOS view with Unity content and trigger that from Flutter.
Create a Flutter project and open the Android native part of it (right click the android folder in Android Studio, choose Flutter -> Open Android module).
Create a native Android view there and use platform channels to display it.
Add Unity content to the native view.
https://flutter.io/platform-channels/
As of May 2022, I would like to share an updated information for mobile app developers who are researching this interesting issue. The reason I'm writing this answer is because there was so many development tasks that need to be done before I get the right answer to the above question. A developer researching this subject should work in both Unity, Android Studio and Xcode in order to find a definitive answer to his/her question, and should also know how to develop mobile apps with Flutter. Honestly, if everything had not gone well, my long time development works might have been wasted. In addition to my answer, I would like to give also positive news on the side of Augmented Reality developers who are using Vuforia and investigating the same issue.
Using the magnificent https://github.com/juicycleff/flutter-unity-view-widget repo; in your mobile app developed with Flutter, you can run the game you developed with Unity or the AR app you developed with Unity + Vuforia. You can use the app you developed with Unity, in the Flutter App you developed. They can also communicate each other in the Flutter App. You can pass parameters from your Flutter App to your Unity application in the Flutter App, and you can also pass parameters from your Unity application to the Flutter App. This means, you can pass parameters from your Flutter App's Dart code to the C# code of your Unity work and vice versa. For those who develop AR Apps with Vuforia, I would like to point out that for the scenario I am working on, I use Image Targets. I have same experience on the phone, with the Unity APK and Android Studio APK, they are in the same stability. Of course APK sizes are different, Flutter App APK size is of course bigger than Unity APK, but in my case this is absolutely ok.
As of May 2022, the answer to the above question is: Yes, you can. Moreover, for those who develop AR Apps in Unity using Vuforia, the answer is also: Yes, you can. I wish success to everyone who will start working in this scenario. Since it is a detailed subject, some difficulties are waiting for you on the way, but if you can see that the product you dream to achieve will be a stable Flutter App, with all the nice features, I am sure that you will find the enough motivation to bring all of them together. Good luck.

Pepper: Running apps developed on Android studio and Choregraphe together?

I am wondering if it is possible to launch applications (behaviours) developed in Choregraphe from within application developed using Pepper Sdk for Android Studio? And what will happen to the behaviours installed on Pepper when I try to run app installed from Android Studio?
Thank you.
I am wondering if it is possible to launch applications (behaviours)
developed in Choregraphe from within application developed using
Pepper Sdk for Android Studio?
No, there is no API for that, and as far as I know there is no plan to add one - the two aren't intended to be mixed.
And what will happen to the behaviours installed on Pepper when I try to run app installed from Android Studio?
There shouldn't be any conflicts between the two; if you're using Autonomous Life's focus, focus can be on either type of application, they can coexist on the same robot. It's just that the two technologies are not intended to coexist in the same application.

Android Studio: develop & debug Android app & AppEngine backend

Time has come to migrate to Android Studio from old good Eclipse...
My app has Android part and server part implemented on AppEngine.
The questions that I don't see direct answers to are:
1) Should it be 1 Project with 2 modules for Android and server parts, or 2 different Projects?
2) How can I debug them at the same time? I'm using REST, so on Eclipse I could in debug mode
.a) watch how http-request on Android's side is formed and just after that .b) see how it is processed on server's side.Can I do the same with Android Studio?
Will appreciate your advice & experience very much!Thanks!
1) The concept of workspace is a little different so in order to get them both working you should include them in the same AS project as different modules.
2) yes you are fully capable of launching the server in debug mode just like in eclipse.
Since AS is dedicated to Android Development, I would not migrate the server part of the app there. I have used the Google App Engine integration on Eclipse, and I am quite content with it. If you have to manage common dependencies between the two projects, this is a different question. Then, maybe, it would be best to not separate them at all.

How to develop watch face with wearable app in android?

I am new in Android wearable app development and recently I came to know that Watch Face API is also now available for Android. So I want to develop wearable app of my mobile app and also I want to develop watch face of that same app.
Can anyone suggest me is this possible or not? As I know that the layout file of wearable app and watch face are same (activity_main.xml). So how can I develop design of watch and wearable app?
I am stuck with this confusion. Please let me know the feasibility.
Thanks in advance.
For creating a watchface you need to create a service using CanvasWatchFaceService class
Watch faces in Android Wear are implemented as services. When a watch
face is active, the system invokes the methods in its service when the
time changes or when an important event occurs (like switching to
ambient mode or receiving a new notification). The service
implementation then draws the watch face on the screen using the
updated time and any other relevant data.
You may follow this https://developer.android.com/training/wearables/watch-faces/designing.html step by step to create your watchface
For wear development, refer to the following:
Creating and running a wearable app
You can run a debug wearable app over bluetooth by following this reference:
Debugging over bluetooth
If you want to test your app on the android wear handheld application, you will need to build a signed release apk and upload it to your mobile device.
For this procedure, read the following:
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.

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?
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.
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.
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.
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)
new)

Categories

Resources