Skip to content
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

Depricated warning #14

Closed
ceciliamzayek opened this issue Sep 13, 2019 · 8 comments · Fixed by #15
Closed

Depricated warning #14

ceciliamzayek opened this issue Sep 13, 2019 · 8 comments · Fixed by #15

Comments

@ceciliamzayek
Copy link

I am getting this warning when I run flutter:

Note: /usr/local/flutter/.pub-cache/hosted/pub.dartlang.org/vibration-1.2.1/android/src/main/java/com/benjaminabel/vibration/VibrationPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

@benjamindean
Copy link
Owner

Most likely it's about the vibrate method. The old method is marked as deprecated, but as far as I know, still works on the old Android versions.

@ceciliamzayek
Copy link
Author

oh so I can just leave it as it is?

@benjamindean
Copy link
Owner

Yes, it's just a warning which you can ignore. I'll try to get rid of it, if possible.

@hrashdan
Copy link

hrashdan commented Oct 6, 2019

google play rejected my app update !

image

I add android.debug.obsoleteApi=true to "gradle.properties" to debug the api and ....

image

so I opened the developer reference and I got this msg:

image

you can update your flutter_vibration plugin to VibrationEffect from here

https://developer.android.com/reference/android/os/VibrationEffect

@jdeltoft
Copy link

jdeltoft commented Oct 8, 2019

I get this error, and when I build apks (debug or release) and side install them, it fails to vibrate on two different android phones I've tested so far.

UPDATE: sorry! I was wrong. I was using HapticFeedback.vibrate(); Using this plugin worked perfectly now for me from the apk.

@saddy001
Copy link

saddy001 commented Oct 9, 2019

I'm also getting the deprecation warning.

@benjamindean
Copy link
Owner

benjamindean commented Oct 9, 2019

This warning shouldn't affect anything because there is a check for API revision to support old Android versions. The only thing I can do is add @SuppressWarnings to the method call. But I can only do it next week. Sorry for the inconvenience. The plugin should still work as expected.

@malikdoksoz
Copy link

This warning shouldn't affect anything because there is a check for API revision to support old Android versions. The only thing I can do is add @SuppressWarnings to the method call. But I can only do it next week. Sorry for the inconvenience. The plugin should still work as expected.

Cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants