Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made AndroidStudio Project for HandTrackingGpu #181

Closed
wants to merge 8 commits into from

Conversation

alizahidraja
Copy link

No description provided.

@alizahidraja
Copy link
Author

i can make android studio version for all of your projects and add them for you too!

@alizahidraja alizahidraja changed the title Made AndroidStudio Project for HandTrackingGpu, Ubuntu 18.04.3 Made AndroidStudio Project for HandTrackingGpu Oct 16, 2019
@jiuqiant
Copy link
Contributor

Thanks for the pull request.

We probably can't accept this PR for two reasons:

  • It's not a good solution to copy the framework's java and proto source code to an app directory. If we accept such solution, the java and proto source code will be duplicated in every single app directory.
  • To fix How to build mediapipe as standalone aar library ? #88, MediaPipe team is going to release a Bazel rule to generate an AAR file that can be imported into Android Studio. With the AAR, you can use Mediapipe in your own Android project.

Just for preview, we will provide a mediapipe_aar() Bazel rule in the next release. The users need to define a mediapipe_aar() rule in a BUILD file within the MediaPipe repo. For example,
putting the following code into mediapipe/examples/android/aar_demo/BUILD.

mediapipe_aar(
    name = "my_aar",
    calculators = ["//mediapipe/graphs/face_detection:mobile_calculators"],
)

Then, run the following Bazel command to generate the AAR.

$ bazel build -c opt --fat_apk_cpu=arm64-v8a,armeabi-v7a mediapipe/examples/android/aar_demo:my_aar

You will get

Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_demo:my_aar up-to-date:
  bazel-genfiles/mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_demo/my_aar.aar

Finally, import this AAR file into Android Studio.

We believe this is a better solution to integrate MediaPipe into Android Studio.

@alizahidraja
Copy link
Author

alizahidraja commented Oct 17, 2019

I understand
But I guess you can merge the java and protoc files as not everyone have easy access to those if they want a android studio project. Or we can have a common directory for all the common java and protoc files and the app build gradles too along with each project
This will help the user and save a lot of their time too
Especially making a android studio project in windows is a real struggle without the java and protoc files made and uploaded in new folder I uploaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants