-
Notifications
You must be signed in to change notification settings - Fork 92
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
HTC One A9 - Call rejected immediately on Android 6.0 #21
Comments
@abardik I created a new cordova project and ran your code. Everything seems to be working correctly for me as you can see in the animated gif here: I added the following code in
This is your code minus the push notification handler. As you can see I ran it on my Emulator using Android Nougat on a Nexus. If you still haven't figured out why it's not working for you, please send a video or gif showing what you see. You don't need to modify the manifest file at all. Try creating a new project like I did and run the code below. If that doesn't work let me know. |
@dmarcs thanks, I still hope to find the problem, but for now I didn't. I created a very simple project and call receiveCall on user 'click', so it is not from push now, and even more - it's from the user action. But I have the same result below: BTW, when I call it from push handler it is even "better" - I don't see virtual buttons, so I can't even close this window or anything. All I have to do - restart the device. And I didn't see that Calling Accounts from your video. I have only Calls and SIP Accounts in my device: I't Android 6.0 on HTC One A9. |
Try running this on your emulator or on a different Android device. Then we can pinpoint if it's the code, device or a PEBCAK issue |
bug fixed with dfe99b1 Please upgrade to v1.0.7
|
Unfortunatelly, the same result. I read in comments somewhere about singleTop for ConnectionService and already put it in my config.xml: <preference name="AndroidLaunchMode" value="singleTop" /> Anywhere, still no luck. My phone has no SIM card, BTW. Maybe that's a problem? I don't have GSM SIM now, so can't check. |
You don't need a SIM card. I have a Motorolla physical device that runs this plugin without any problems, and I don't have a SIM card for it. Try running |
I never used emulators or terminals before, just built a project on Phonegap Build and installed it on the device. So, for "adb logcat" I need to learn and use new stuff. Maybe, there is a faster way to get logs from the Android device? For now, I use another way to handle calls on Android. When the app receives a push, cordova-plugin-background-mode wakes and unlocks the device and brings the app to the foreground. Then app establishes a connection and shows its call GUI, where user can control the call, turn on/off video, mute/unmute, etc. |
You should be able to use
Does this mean that you are able to see the native call UI with |
Hi, sorry for the delay, I missed your answer. I ment that the app shows its own UI now, not the native one from cordovaCall. It's ok, because it works without any limitations, I can wakeup and unlock the device, bring the app to front and show my own UI (like Skype does on Android). But I think, that Google will restrict that kind of activity in the near future, like Apple did. So, we need to be prepared to use a native call UI, that's why I need cordovaCall on Android. Backing to cordovaCall. I can see the native UI when I call receiveCall. But, as you can see on the screenshot earlier, the call is appeared already ended (CALL ENDED on the button). If I call cordovaCall.endCall() after few seconds, the native UI shows me a new screen with a prompt to add a missed contact to my Contact List. So, the UI itself works, I believe. But it appers already ENDED with no possibility to close that ENDED screen. I tried to insert a SIM card. It unlocked some features in Settings -> Calls, but the app did not propose to add it to Call Accounts, like in your video. Maybe, my problem is absent permissions, somehow. Also I tried with and without cordova-plugin-background-mode, even from simple empty app with one button click, that calls receiveCall - the same result. |
@abardik I see. Double check the version of CordovaCall you're using with |
@dmarcs I'm using the last version (1.0.7 as Phonegap Build says). I don't have Android Studio installed because I'm using Phonegap Build. That's why I can't run adb logcat on my PC. But I'll install Studio and run the emulator on this weekend. For today I'll check it on another HTC and let you now soon. |
@dmarcs It's working great on emulator! And it's really better UX than my app's call UI. It requested to add my app to Call Accounts and than I've got an incoming call with native UI. Really good. Now I need to understand how to debug it on my HTC... Let you know later. |
@dmarcs I've got a logcat from HTC, but it's huge, so I just copy here a ConnectivityService error. On emulator everything is perfect.
|
Thanks for testing it on the emulator and for the logcat. I don't see anything obvious in the logs. This is a really tough problem, but I'll continue to think about it. |
I think, it's not about a plugin or an app. It's about the particular device model, probably. If it can help, the last time I ran it on HTC, there were a lot of these errors:
|
Yeah that's what it seems like, but I'll leave this issue open in case I'm able to think of a way to fix it. I don't think that error has anything to do with it, but since you're getting so many it's possible. I'll have to look into it more, but it's good that at least you have a working solution for now. |
Yes, thank you. I'll try to find other Android devices to check more. |
Confirming the same issue on ...when I test receive call ..nothing happens but that error....were you able ever to resolve? HTC Cordova info: |
@greaterking This plugin requires Marshmallow and up, as that's when ConnectionService was introduced. |
Ok thanks ...I missed that some how.
On Wed, Aug 8, 2018 at 6:10 PM Daniel Marcus ***@***.***> wrote:
@greaterking <https://github.com/greaterking> This plugin requires
Marshmallow and up, as that's when ConnectionService was introduced.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADF6F0TaNVj0uHKE_ZZJJ_nrnDHfS0PGks5uO2HlgaJpZM4R8ow2>
.
--
Ralph Theart
|
I'm facing a similar issue on Android 7.1.1 on ASUS device. I tried with and without a SIM. What happens is that on receiveCall() I get the option to choose to set calling accounts and upon clicking on "Calling Accounts" option I'm taken to the "Calling accounts" settings page. There I see a SIP Settings menu with the following options:
I've tried playing with all 3 options but as soon as I click back button on this page, I'm taken back to my app and receiveCalls() failure callback gets called. There, I get the error message "You need to accept phone account permissions in order to send and receive calls".
|
Any updates on this? Do I need a new ticket for my issue? This is one of the last things stopping from a launch. |
I tested it on HTC U11 (Android 8.0.0). Everything is fine, as well as on an emulator. And there is still the same error on HTC One A9, and no Call Accounts in Settings, just SIP Accounts. I think, it's a device, not a plugin. Somehow, on some devices this service is not imlpemented properly or disabled for some manufacturer's reasons. For I decided to use wakeup-unlock-foreground and show my own call UI instead of CordovaCall, unfortunatelly. |
Hi again! Some new facts about this issue. It's still the same behavior on HTC A9 after upgrade to 1.1.6. In receiveCall error callback I see the following message: "You need to accept phone account permissions in order to send and receive calls". I checked the actual permissions my app has: Permissions: Uses features: SDK: Maybe it can help somehow to find out what's going on, because your plugin works just excellent on iOS and other Androids, and I would be happy to wipe my own call UI out and remove a background plugin, which I need to use to wake up and unlock the device to show that UI. Thank you again for this plugin! |
Hello. |
Hi, thank you for your plugin. On iOS it works fine. But on Android I have the following sequence of events when notification received:
And than a missed call in notification center. Sometimes 2 and 3 events appears twice in one call. The same behavior in foreground and background mode.
I allowed incoming internet calls in Settings, but there are no applications in Accounts, as you described in docs. So maybe it is a problem. When internet calls have been disallowed, I've been receiving the connection screen, but call has been rejected immediatelly without my interaction, but at least I seen it.
There is a code:
All permissions for my app are allowed (Camera, Microphone, Phone, Storage). Maybe I need to ask for some other permissions on Android? I use Phonegap Build for this project.
Thank you.
The text was updated successfully, but these errors were encountered: