Joe McMillan

Greenhorn
+ Follow
since May 01, 2021
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
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 Joe McMillan

Please let me know. Thanks. Really struggling on this one.
4 weeks ago
Any idea where I may be going wrong? If needed, I can attach the ZIP file. Thank you.
1 month ago
Hi, I tried running it on a real device through USB connection, no luck. Thanks- Krish
1 month ago
Hi,

I did some research, couldn't really find anything. I'm also getting this error now: call to OpenGL ES API with no current context.

I found these two posts:
https://stackoverflow.com/questions/18807857/opengl-es-2-0-context-in-android
https://stackoverflow.com/questions/11286819/opengl-es-api-with-no-current-context

...but can't really connect how this relates to my project. Any idea how to resolve this error? Thanks.
1 month ago
[cross-posted stack overflow: https://stackoverflow.com/questions/67406280/why-do-we-set-the-parameter-in-hashmap-to-object-when-sending-data-to-firestore]

I am watching a video to create a simple app(just to practice concepts) where the user enters the title and their thoughts. This data will get sent to Firestore.

However, I was confused on the part where I send data through a HashMap:



The title and thought are basically just the string values of the user's input for title and thought.



After that, all I'm doing is just passing it into the journalRef: journalRef.set(data) where journalRef is just the DocumentReference of my database:




My question is: Why do we pass data as: Map<String, Object> instead of Map<String, String>. Isn't the title and thoughts just the user's input as a String value?

Thanks!
.
1 month ago
Thanks. I looked again, and now the code is crashing after the InputImage.

in my debugger the code crashes and goes into CameraView.java where it says "Frame Processor Crashed."

I've tried using Log.d("error", Log.getStackTraceString(new Exception())) after the InputMessage and in onErrorListener(), but it doesn't print out anything.
Edit: It's now printing out this:

Thanks, Krish
1 month ago
This piece of code is supposed to detect contours on the face in real-time. This means just drawing onto the face in real-time(so as the camera moves canvas will draw onto the face to detect the left eyebrows, nose, mouth, etc.).

This piece of code isn't functional.

On the other hand, I have another detector which detects contours(nose, mouth, etc.) on a photo(so not in real-time). This piece of code is functional in my analyse method(I called this landmark paint).

Thanks.
1 month ago
Thanks. The code crashes on this line:

Code excerpt:



The rest is just a bunch of for loops looping over each contour. Thanks.
1 month ago
Note: cross-posted from stack overflow: https://stackoverflow.com/questions/67375221/why-isnt-updatequestion-executing-on-changeanimationonanimationend
I'm creating an animation for my trivia game. Once the user selects an answer(either true or false) for each statement, the question will slide to the left and display the next question.

The functionality is working fine, however, I'm confused on one concept.

When I call changeTheQuestion(invokes animation) and updateQuestion(set's the new text of question and set's the new text of counter) like this:



...everything works fine. However, when I move the updateQuestion() call to onAnimationEnd() of changeTheQuestion(), it doesn't update the question:



What may be causing this? Thanks!
1 month ago
Any help would be appreciated a lot. Thanks.
1 month ago
Hi, thanks. Anything you've come across that might be able to help me with this post: https://coderanch.com/t/741943/mobile/Google-ML-Face-Detection-Kit? I'm not using cameraX, but rather a custom camera API. Thanks!
1 month ago
Hi,

Thank you! I think that since Media player decodes media in real-time(to play long clips), it uses a lot of processing-power while doing so. So it's kind of like a cause an effect relationship.
1 month ago
Note: Cross - posted from here(https://stackoverflow.com/questions/67342407/why-do-we-use-mediaplayer-for-long-clips-if-its-resource-intensive)--couldn't get any help there.

I was reading this post: AudioTrack, SoundPool or MediaPlayer Which Should I use?(https://stackoverflow.com/questions/13527134/audiotrack-soundpool-or-mediaplayer-which-should-i-use)

but got confused on the post by @Kishore P

MediaPlayer - Streams and decodes in real-time for local or remote files. Good for long clips and applications such as background music. More CPU and resource-intensive. Relatively long initialization time. MediaPlayer is a state machine!‚Äč

"More CPU and resource intensive."

Why would we use MediaPlayer for long audio tracks if it's resource intensive? Wouldn't that just waste a ton of memory over time?

Thanks!

1 month ago