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

Rsrp/Rsrq Signal Information Not Updating with CellSignalStrengths changing #8205

Closed
ragiovan opened this issue Jul 20, 2023 · 3 comments
Closed
Assignees
Labels
Area: Mono.Android Issues with the Android API binding (Mono.Android.dll).

Comments

@ragiovan
Copy link

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.)

Affected platform version

VS 2022

Description

Using Android.Telephony and a StateChange listener, the signal strength listener is called whenever rsrp changes (When it happens can be verified going into the sim status changes and looking at rsrp) . However, when looking through the actual Registered LTE signals LTE rsrp/rsrq is not changing at all.

Steps to Reproduce

Standalone Solution - in .net maui, using Android API: https://github.com/ragiovan/cellularstrengthsNotChanging

Open tst solution. Connect android phone and start waving it all around. Put in a faraday cage if you want. The rsrp/rsrq received will never change.

Did you find any workaround?

No

Relevant log output

No response

@ragiovan ragiovan added Area: Mono.Android Issues with the Android API binding (Mono.Android.dll). needs-triage Issues that need to be assigned. labels Jul 20, 2023
@jpobst
Copy link
Contributor

jpobst commented Aug 3, 2023

Ultimately, all .NET Android does is provide generated wrappers that allow you to call Google’s Android API. We do not have much expertise in how to use those API’s properly.

However, it appears to work as I would assume when running in the emulator:

image

Changing the "Signal Strength" in the emulator options hits your event listener method.

@jpobst jpobst removed the needs-triage Issues that need to be assigned. label Aug 3, 2023
@ragiovan
Copy link
Author

ragiovan commented Aug 6, 2023

I don't know exactly how the emulator is emulating a signal strength change. But from your picture it looks like it may be some enum corresponding to a different amount of bars on your phone. I think it's not going to be a good way to test it for this reason - I believe I have read somewhere that the strength change event is called only when the bars change. So if you have 4 bars or whatever, out of all the rsrp values you could get for the signal strength, the resolution is so low you will hardly ever get a signal strength change.

Testing on my phone where I can see the RSRP change by a lot in the android settings, even if the bar level doesn't change, a signal strength change event isn't raised. That is my claim for this issue. If this is the case for when signal strength change event is triggered, it would be nice to get better resolution on that since the change from one bar another has to be so drastic. Especially since you can see the rsrp change in the settings of android, it seems like it should be using this same event on a lower level. However, I don't know if this is produced in the process of mono going from android to xamarin, or if it's produced in the google api like you said itself.

@jpobst
Copy link
Contributor

jpobst commented Aug 6, 2023

Agreed, the point of showing the emulator is simply to demonstrate that I do not believe this is an issue with our wrapper. When the Android system calls the onSignalStrengthsChanged, we do indeed raise the proper event.

As for when or how Android chooses to call that API, I think that is a question for Google or the device manufacturer.

@jpobst jpobst closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area: Mono.Android Issues with the Android API binding (Mono.Android.dll).
Projects
None yet
Development

No branches or pull requests

2 participants