Glenda Karen

Ranch Hand
+ Follow
since Oct 02, 2020
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Glenda Karen


I'm wondering what are good tools for UI testing that can be used for Java?
I've heard of Selenium but I'm wondering if there are any other/better ones?

Thanks so much!
2 months ago
Thanks so much! I'll look into using AsyncTask

Seems the run method is only being executed once when the app starts and then doesn't run again.

Thank you, I have changed it ppgResult and registerThread
3 months ago

I have a Thread that runs from the MainActivity and I'm wondering how I can update the UI from the result in the Thread?

The MainActivity looks like:

And in the SensorInterface Thread:

I would like to update the TextView with PPGresult

I tried adding to TestJNIActivity:

but nothing seems to happen.

Any ideas would be appreciated, thank you!
3 months ago
I have an android app which turns on a sensor on my device and collects and displays data in the app to the user.

On the home screen the user presses "START" which opens a new page that displays the data.
When the user presses the back button it take them back to the home page.

The problem I am facing is when the user presses "START" again, the display page still shows values from the previous test.

Here is the AndroidManifest:

Part of the MainActivity code:

Thanks so much!
6 months ago
Thank you! We seemed to have solved the problem adding mFlashThread = null; in to the onBackPressed() if statement.

Thanks again for your help!
6 months ago
Thanks so much!

I think I only have this one thread running:
6 months ago
Hi, thanks so much for your reply.

The code for when the back button is pressed looks like:

The thread, both for sensor thread and network is started (or stop) by startFlashSensor()

when it is false, the method stops

but the network continues, even the part inside the statFlashSensor method.

So I guess my question now is, how to stop both threads (network and sensor)?
6 months ago
I have an android app which turns on a sensor on my device and collects data, the data is then sent via http requests and a response is returned back to the app.
However when the back button is pressed it doesn't go back to the home page of the app, instead it crashed with:

unfortunately app has stopped

And I get these errors:

If I press the back button before data gets collected then the app goes back properly to the home screen.

It seems that the ServiceConnection class is still running which is causing the error.

Any suggestions would be great,
Thanks so much!
6 months ago

I have a few round circles in my app. I would like to change their colour depending on the response I get from an http request.
The cirlces look like:

and are being added in as FrameLayout like:

Then in the java code the http request is being made:

So if the response is 1, the circle will turn green, if the response is 2 the circle will turn blue etc.

Thanks so much!
6 months ago

I am wondering if there is a way to make a few circles that change colour depending on a trigger?
For ex. if the app is displaying temperature of the user, the circle will be green if the temperature is in a normal range, red if the temperature is a low grade fever and blue if a high grade fever. (And another circle for other measurements etc)

Can this be done in android studio itself or will I have to add something like JavaFx or the like?

Thanks so much!
6 months ago
Hi Ron McLeod,

Just wanted to thank you again for your help! We used the OkHttp library as you suggested and it worked!

(We used verison com.squareup.okhttp3:okhttp:3.12.0 for Api 19)
6 months ago
Good to know API 19 is still being used and actually has some benefits too:)

Thanks so much again for all the help!
6 months ago
Thanks so much!

Wow that is very interesting re apache.

At the moment the API needs to stay at 19 to be compatible with the devices the app is running on.

Perhaps though as you mentioned, I can use another library. I think; is compatible with API 19, so maybe that could be a solution.

Thanks again for all your help!
6 months ago
Thanks so much! Really appreciate your time helping me!

It seems one of the SDKs we are using in the app is calling maven.apache could that be the problem? and is there anything we can do about it?(since we need this sdk)
6 months ago
Thank you!

I tried adding the dependency but sill got the error:(

I checked the external library and I can see the class is there.
6 months ago