fix: progressHandler not working on new devices & handlers not responding#474
fix: progressHandler not working on new devices & handlers not responding#474theatifwaheed wants to merge 4 commits intodlutton:masterfrom
Conversation
|
@dlutton here is the MR. |
| invokeMethod("speak.onStart", true) | ||
| } | ||
| } | ||
| if (Build.VERSION.SDK_INT < 26) { |
There was a problem hiding this comment.
Is progressHandler not working for you on newer devices? This was added because onRangeStart was added in SDK version 26 which will add to onProgress. This onStart will get called regardless since it was added in version 15, so we only need to add to onProgress here if less than 26. Basically if your device is 26 or greater, the progressHandler should work via the onRangeStart listener.
There was a problem hiding this comment.
I was not receiving on Progress Events from native to flutter side on Android 14.
When I removed this, It was receiving on Flutter Side.
Then I was getting issue of NULL functions and when I called setChannelMethodCallHandler after setting all of the handlers, It started working i.e. sending data to project.
cc @dlutton
There was a problem hiding this comment.
@theatifwaheed that's very odd, I'll have to test this before merging in since I don't want the issue of having onProgress being called multiple times initially.
There was a problem hiding this comment.
@theatifwaheed I apologize for the extremely late reply. I tested on a pixel 5 android version 14 device and it's working in the master branch without this change. Can you provide an example of it not working? This is an example of the code I used to confirm it's working:
https://gist.githubusercontent.com/dlutton/30b065449cb2eb941dfd6bef86aeefaf/raw/5ee94f80f0cbd678c5645c27caaaa078c307376f/ttsSetProgressHandler.dart
|
@dlutton any update on this PR ? |
|
@theatifwaheed sorry I've been busy with work, but I'll try to make some time this week to test this and then hopefully create a new version for you. |
We just need to call setChannelMethodCallHandler after setting all of the handlers from project we're working in.
We can also call this function on every set...Handlers method to make sure this is not required for the User Project.