platform-samples icon indicating copy to clipboard operation
platform-samples copied to clipboard

[Bug]: Call notifications not displayed in Android auto

Open Viish opened this issue 1 year ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

In which area is the issue?

Connectivity

In a specific sample?

Telecom Call Sample

What happened?

Incoming call notification is not displayed in Android Auto (incoming GSM phone call & WhatsApp call notifications are OK). Tested using Google Pixel 6 Pro running Android 14 QPR3 and Android Auto 11.5.641024-release.

Relevant logcat output

2024-04-03 13:17:16.460  1505-1505  Telecom                 system_server                        I  InCallController: onConnected to ComponentInfo{com.google.android.projection.gearhead/com.google.android.apps.auto.components.telecom.service.CarProjectionInCallServiceImpl}: ICSBC.oSC(cgapg)@XWg
2024-04-03 13:17:16.460  1505-1505  Telecom                 system_server                        I  InCallController: trackCallingUserInterfaceStarted: com.google.android.projection.gearhead is now calling UX.: ICSBC.oSC(cgapg)@XWg
2024-04-03 13:17:16.461 21682-21701 ClientTran...iceWrapper com.example.platform.app             I  oACC: id=[7023ceef-d90b-4b76-b732-e724a620300a], code=[0]
2024-04-03 13:17:16.461  1505-1505  Telecom                 system_server                        I  InCallController: Adding 1 calls to InCallService after onConnected: ComponentInfo{com.google.android.projection.gearhead/com.google.android.apps.auto.components.telecom.service.CarProjectionInCallServiceImpl}, including external calls: ICSBC.oSC(cgapg)@XWg
2024-04-03 13:17:16.462   927-927   usf_sensor_hal          and...ware.sensors-service.multihal  D  magnetometer: Enter Flush
2024-04-03 13:17:16.462  1505-1622  ActivityManager         system_server                        D  sync unfroze 2676 com.google.android.cellbroadcastreceiver for 3
2024-04-03 13:17:16.463 21682-22868 CallsManager            com.example.platform.app             I  addCall: creating call session and running the clients scope
2024-04-03 13:17:16.463  2312-2312  SHANNON_RCS             com.shannon.rcsservice               D  3094 [0][PROX] notifySmsEvent, notify to: [CONF] SlotId: 0, ConfProviderHelper(138845591) (TelephonyProxy$1%lambda$notifySmsEvent$2:162)
2024-04-03 13:17:16.464   927-927   usf_sensor_hal          and...ware.sensors-service.multihal  D  linear acceleration: Enter Flush
2024-04-03 13:17:16.464  2676-2676  CellBroadcastReceiver   com...android.cellbroadcastreceiver  D  onReceive Intent { act=android.intent.action.PHONE_STATE flg=0x1000010 cmp=com.google.android.cellbroadcastreceiver/com.android.cellbroadcastreceiver.CellBroadcastReceiver (has extras) }
2024-04-03 13:17:16.465  2312-2312  SHANNON_RCS             com.shannon.rcsservice               D  3095 [0][PROX] notifySmsEvent, notify to: [SHAN]TelephonyProxyListener(33963813) (TelephonyProxy$1%lambda$notifySmsEvent$2:162)
2024-04-03 13:17:16.465  2312-2312  SHANNON_RCS             com.shannon.rcsservice               D  3096 [0][PROX] notifySmsEvent, notify to: [DEVP] DeviceProvisioningServiceTelephonyProxyListener(159164857) (TelephonyProxy$1%lambda$notifySmsEvent$2:162)
2024-04-03 13:17:16.465  2312-2312  SHANNON_RCS             com.shannon.rcsservice               D  3097 [*][DEVP] onSmsEvent, No target event: shannon.rcsservice.userequipment.call.e_callStateChanged (DeviceProvisioningServiceTelephonyProxyListener%onSmsEvent:138)
2024-04-03 13:17:16.465  2312-2312  SHANNON_RCS             com.shannon.rcsservice               D  3098 [0][PROX] notifySmsEvent, notify to: [SHAN]TelephonyProxyListener(153229541) (TelephonyProxy$1%lambda$notifySmsEvent$2:162)
2024-04-03 13:17:16.466  2676-2676  CellBroadcastReceiver   com...android.cellbroadcastreceiver  W  onReceive() unexpected action android.intent.action.PHONE_STATE
2024-04-03 13:17:16.466  2173-3699  BluetoothPbapService    com.google.android.bluetooth         D  getConnectionState: XX:XX:XX:XX:24:9D
2024-04-03 13:17:16.468  1945-1994  BluetoothMap            com.android.systemui                 D  getConnectionState(XX:XX:XX:XX:24:9D)
2024-04-03 13:17:16.474   927-927   usf_sensor_hal          and...ware.sensors-service.multihal  D  gravity: Enter Flush
2024-04-03 13:17:16.476  2173-3699  BluetoothPbapService    com.google.android.bluetooth         D  getConnectionState: XX:XX:XX:XX:24:9D
2024-04-03 13:17:16.477   927-927   usf_sensor_hal          and...ware.sensors-service.multihal  D  gyroscope: Enter Flush
2024-04-03 13:17:16.477  1945-1987  BluetoothMap            com.android.systemui                 D  getConnectionState(XX:XX:XX:XX:24:9D)
2024-04-03 13:17:16.479  1505-1505  Telecom                 system_server                        I  Call: maybeOnInCallServiceTrackingChanged: called on TransactionalService: ICSBC.oSC(cgapg)@XWg
2024-04-03 13:17:16.479  1505-1505  Telecom                 system_server                        I  InCallController: 1 calls sent to InCallService.: ICSBC.oSC(cgapg)@XWg
2024-04-03 13:17:16.480 13454-13454 GH.InCallService        com...e.android.projection.gearhead  I  onCallAdded
2024-04-03 13:17:16.480 13454-13454 GH.ICarCall             com...e.android.projection.gearhead  I  onCallAdded: 16
2024-04-03 13:17:16.481 13454-13454 GH.InCallService        com...e.android.projection.gearhead  I  onCallAudioStateChanged
2024-04-03 13:17:16.481 13454-13454 GH.ICarCall             com...e.android.projection.gearhead  I  onCallAudioStateChanged (muted: false route: 1 mask: 9
2024-04-03 13:17:16.482 13454-13454 GH.CallManager          com...e.android.projection.gearhead  I  getCalls: []
2024-04-03 13:17:16.482  1505-18756 Telecom                 system_server                        I  Ringer: startRinging timings: isRingerAudible: 0, letDialerHandleRinging: 0, isVolumeOverZero: 1, hasExternalRinger: 0, isSilentRingRequested: 0, isSelfManaged: 0, isWorkProfileInQuietMode: 0, isTheaterModeOn: 0, shouldRingForContact: 1, : TSI.aC->[email protected]>CAMSM.pM_2002->R.sR(cepa)@XWc
2024-04-03 13:17:16.482  1505-18756 Telecom                 system_server                        I  Ringer: Ending early -- isTheaterModeOn=false, letDialerHandleRinging=false, isSelfManaged=true, hasExternalRinger=false, silentRingingRequested=false, isWorkProfileInQuietMode=false: TSI.aC->[email protected]>CAMSM.pM_2002->R.sR(cepa)@XWc
2024-04-03 13:17:16.482 13454-13454 GH.CallManager          com...e.android.projection.gearhead  I  Audio route changed from 1 to 1
2024-04-03 13:17:16.483 13454-13454 GH.CallManager          com...e.android.projection.gearhead  I  Audio route mask changed from 9 to 9
2024-04-03 13:17:16.483 13454-13454 GH.CallManager          com...e.android.projection.gearhead  I  getCalls: []
2024-04-03 13:17:16.483  1505-2993  MediaFocusControl       system_server                        I  requestAudioFocus() from uid/pid 1000/1505 AA=USAGE_NOTIFICATION_RINGTONE/CONTENT_TYPE_SONIFICATION clientId=AudioFocus_For_Phone_Ring_And_Calls callingPack=com.android.server.telecom req=2 flags=0x4 sdk=0
2024-04-03 13:17:16.483 13454-13454 GH.CurrentCallProducer  com...e.android.projection.gearhead  I  AudioState changed. New route: 0X1(0X9)
2024-04-03 13:17:16.484  1505-2993  AS.FadeOutManager       system_server                        I  unfadeOutUid() uid:1000
2024-04-03 13:17:16.484 13454-13454 GH.CallManager          com...e.android.projection.gearhead  I  getCalls: []
2024-04-03 13:17:16.484   414-414   CAR.AUDIO.AFM           com...e.android.projection.gearhead  I  Received onAudioFocusLoss. lossReceived: LOSS_TR, wasNotified: true, clientId: [email protected]@964c5a3, packageName: com.spotify.music, clientUid: 10288
2024-04-03 13:17:16.484   414-414   CAR.AUDIO.AFM           com...e.android.projection.gearhead  I  Processing onAudioFocusLoss. currentGrant: GAIN, invalidateByCarAudioFocusChange: false, lossReceived: LOSS_TR, packageName: com.spotify.music
2024-04-03 13:17:16.484   414-414   CAR.AUDIO.AFM           com...e.android.projection.gearhead  I  Received transient loss for client with gain. Not removing client from focus stack and not sending focus change notification. clientId: [email protected]@964c5a3, packageName: com.spotify.music
2024-04-03 13:17:16.484   414-414   CAR.AUDIO.AFM           com...e.android.projection.gearhead  I  Received onAudioFocusGrant. gainRequest: GAIN_TR, requestResult: GRANTED, clientId: AudioFocus_For_Phone_Ring_And_Calls, packageName: com.android.server.telecom, clientUid: 1000
2024-04-03 13:17:16.484   414-414   CAR.AUDIO.AFM           com...e.android.projection.gearhead  I  Not handling focus event for phone calls. attributes: AudioAttributes: usage=USAGE_NOTIFICATION_RINGTONE content=CONTENT_TYPE_SONIFICATION flags=0x800 tags= bundle=null

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Viish avatar Apr 03 '24 11:04 Viish

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar May 04 '24 03:05 github-actions[bot]

Hi,

Any chance to have this issue fixed please?

It is still happening with the latest android auto release (11.7.641464) on play store and latest version of core-telecom (1.0.0-alpha3) and appcompat (1.7.0-beta01) packages.

Thanks in advance.

Viish avatar May 04 '24 06:05 Viish

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Jun 04 '24 03:06 github-actions[bot]

thanks @Viish

I'm thinking there's special code to show the notification on AA?

note on this page about "beta partners only". Has this project been accepted by Google? https://developers.google.com/cars/design/create-apps/app-types/communication

image

eturk1 avatar Jul 30 '24 16:07 eturk1

Hi @eturk1,

We've submitted ourselves but no, we haven't been accepted in yet. That being said, I'm quite sure it used to work before (maybe in a previous version of either Android OS or Android Auto app). But as for displaying message notifications in Android Auto (that simply requires some info in the Manifest and following some guidelines), call notifications should work the same (we're using CallStyle notifications with accept/decline buttons, we're using TelecomManager APIs, etc...).

I know WhatsApp manages to make it work, but if all it takes is being white-listed by Google it's a bit sad for small developers / companies. I really hope this issue will either be fixed in Android Auto, and that proper guidelines will be given for developers to have all information to make this work.

Cheers,

Viish avatar Jul 30 '24 16:07 Viish

Ah, not accepted yet. Seems that's the thread to pull.

I remember news about how huge it was for Whatsapp and Skype to be allowed to display an incoming call notification. For safety, Google really guards popups, animation, etc in AA

I believe Avochato was able to show answer/decline in their app.

Hmm, if Google has undocumented access to notification, they may never allow that code in open source. 🤔

Any way to follow up on the beta partner program?

eturk1 avatar Jul 30 '24 16:07 eturk1

Yes, not accepted yet but it should work with Android Auto in developer mode so we can test things out, like IM notifications that require play store validation but work in dev mode.

Viish avatar Jul 30 '24 20:07 Viish

Any way to follow up on the beta partner program?

No, the submission is merely a Google form to fill and send. All we have so far is an automated email that confirms they have received our submission.

Viish avatar Jul 30 '24 20:07 Viish

I found my answer in your telecom_auto branch, why wasn't it merged into master?

Viish avatar Aug 07 '24 08:08 Viish