-
Notifications
You must be signed in to change notification settings - Fork 397
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
Vibrate doesn't work in android and ios #3702
Comments
I just add this to and it actually work in android 11 but not in ios. Any support about this? |
It seems the code here should be updated based on this. On iOS there's no guarantee vibrate will work as mentioned here. Relevant paragraph:
This applies to this code. So this should only be fixed for Android only as far as I can tell. |
Hi There May I take This Up ? I am new to Open Source so I want to try this one. |
Sure @regulas1 |
Hi @shai-almog can you check if the code below is the correct fix ? Replaced this |
The second code is in Kotlin, not Java. So no it isn't correct. You need to adapt the Kotlin syntax to Java. |
Apologies. |
I can't compile things in my head. I suggest making the changes and trying to compile them. The easiest way is to create a test application, generate a native Android project from that and try to debug this in Android Studio. The code you included assumes |
makes sense thanks for the great help |
Hi, apologies if I'm missing something obvious but it appears that no PRs have been made regarding this issue and therefore I am wondering if it is still up for grabs as I need an issue for a Uni assignment. It appears to be a pretty simple fix which is great looking that I had previously started working on another issue on another project only for them to announce that they would implement a full feature freeze for the whole project while they rewrote the entire repository... And my assignment is due sort of soon lol. |
Sure you can take over apologies had some issues with getting devices to test on after the change |
Based on this question it works and just requires adding the vibrate permission. |
Cool, is the requirement for adding the vibrate permissions client side or can it be globally set within CodenameOne? Also, I have written a simple case statement that checks if the SDK is greater than 31, if it is then it uses the new vibrate manager and if not it uses the existing code. Just some simple retro-comparability that I thought wouldn’t hurt to implement. |
Display.getInstance().vibrate(1000);
why this code doesn't work?
The text was updated successfully, but these errors were encountered: