AsteroidOSSync icon indicating copy to clipboard operation
AsteroidOSSync copied to clipboard

[Dual SIM] No incoming call notification for secondary SIM

Open Megver83 opened this issue 3 years ago • 6 comments

I installed the app from F-Droid, version 0.22, and synced with a bass watch. Till now, it works fine, but I get no incoming call notification and the app has all permissions.

Device is a Xiaomi Redmi Note 8 running LineageOS 18, Android 11. Maybe related to #114 ?

Megver83 avatar Sep 08 '22 00:09 Megver83

OK, so I think I found something interesting. This phone is dual SIM, the watch notifies my incoming calls from one SIM, but not the other other one.

Megver83 avatar Sep 10 '22 19:09 Megver83

Thanks for reporting the issue! Great observation too!

This is an issue with the way we use PhoneStateListener where it picks the first SIM by default (https://github.com/AsteroidOS/AsteroidOSSync/blob/afb09f90f4b378bccbb07626f4776a5382432db5/app/src/main/java/org/asteroidos/sync/services/PhoneStateReceiver.java).

https://stackoverflow.com/questions/25009926/phonestatelistener-is-not-called-for-sim-slot-2 describes the same issue.

It seems that we need to create another instance of the listener and specifically listen for that SIM as well.

MagneFire avatar Sep 10 '22 20:09 MagneFire

Oh, so you were not aware of this. Glad to know there's a solution. Do you publish nightly builds or something? So I can test the app before there's a release, in case you wish so

Megver83 avatar Sep 15 '22 14:09 Megver83

Indeed we were not aware of this issue.

We do not publish nightly builds, but we might be able to distribute self-signed apks when we get around to testing a solution. Unless @jrtberlin knows a better method that could use the F-Droid infrastructure so that we don't get a signature mismatch.

MagneFire avatar Sep 18 '22 13:09 MagneFire

I want to release a build on F-Droid anyway to get the recent changes published

jrtberlin avatar Sep 18 '22 13:09 jrtberlin

I thought this was going to be fixed in 0.23. Or is it going to be in the next release?

Megver83 avatar Oct 05 '22 21:10 Megver83