Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!

Steven Letson

Greenhorn
+ Follow
since Apr 29, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
2
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Steven Letson

If you can see "D/DebugActivity: detectedObjects.size=1", it means it detected one object successfully.

Now, I think you can spend some time trying to compare the minimal version and your code to see if there is any typo or missing parts or wrong order of certain calls. Probably a very subtle but critical difference. Let us know what you find.
3 days ago
Hi Joe,

If the ML Kit quick start app: https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart doesn't work for you, there might be a bigger problem, not specific to your code.

(1)Does the StillImageActivity or LivePreviewActivity in the quickstart work for you?

(2)What device are you using?

(3)Could you try a different device to see if the ML Kit quick start app work on any device for you at all?

(4)Could you try a CameraX tutorial without MLKit to understand whether the issue is related to CameraX or ML Kit?
4 days ago
Hi Joe,

Have you tried to build and run the ML Kit quick start app: https://github.com/googlesamples/mlkit/tree/master/android/vision-quickstart ?  Does the CameraXLivePreview in that app work correctly?
My code is actually a simplified version from that sample code. I verified it works fine on my phone, but I might miss something. For example, I removed code related to permission https://github.com/googlesamples/mlkit/blob/4645ec6011d5373283b31b79a12fd62f48af3c5f/android/vision-quickstart/app/src/main/java/com/google/mlkit/vision/demo/java/CameraXLivePreviewActivity.java#L440-L497   However, it might be required on certain Android OS level I guess.   You could try adding permission related code back to see if it solves your case.

4 days ago
Hi Mason,

Based on your questions and the interaction we had so far, I can feel you might be new to Android development. In this case, I would suggest you to invest a bit more time on learning Android and Java/Kotlin basics first, which could probably help improve you productivity for long term.

You could find some really good beginner courses on Coursera, edX, Udemy, Udacity......  try listen to the intros and find one you are comfortable with.  Hope you can learn things more effectively from those courses and become better and better in creating good apps.
4 days ago
My bad. I actually missed one class. Please create this class as well.


4 days ago
I tried to write a minimal version and it works fine for me. Could you try it?



Include the Camera permission in AndroidManifest


Layout:


To check log:


Let me know if this works for you. If so, we can dig deeper into the diff between your code and this.


BTW, where did you see the problematic code example on line 27:  .  That doc need to be fixed.
1 week ago