-
Notifications
You must be signed in to change notification settings - Fork 27
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
can't get record when it's in production #12
Comments
Yes, this package actually can not be used in the production. Basically, the reason for this lies here: Moreover, if you even able to manage to make sure the Health Connect Client model data is converted to JSON, you will get in the production something like that (and dates will be lost). 😅 All to sum up, this library is just not a real wrapper for the Android Health Connect. It just has a good start, such as not inventing new data types, and trying to be an actual wrapper for the Health Connect which is nice due to trying to extend the overall capabilities of Flutter framework. And one note for developers and potential contributors of this package. Probably, new converters can be added. Jackson library can be used here, just make sure it converts not the whole class instance which in production has completely different variable names, but an actual Map<String, Any>. Some code would be needed, but in this way nothing would be lost, and package could be used in production. |
@duynguyen242 Is there any plans for a fix for this? |
Fixed the error, needs the following to be added to
The idea behind the solution is that the Jackson package tries to parse the Helath Connect classes, which are its input. By adding Health Connect classes to ProGuard, these classes are not minified and, thus, transported as a map with known keys to the Flutter side. Thanks to @vaidotasstrazdas for the information. Maybe an update to the documentation, @duynguyen242 ? |
Hey @dnkoulouris where do you find this file? Is this something you created? |
https://stackoverflow.com/questions/38213918/how-to-prepare-a-proguard-file-and-whats-included-in-it |
When the build apk (release) package has an error, after tracing it turns out that the error appears from the package used.
However, when the package was in debug (pre-release) mode, there were no errors, it turns out that there are methods that are asynchronous. Our assumption is that when in release mode, packages cannot handle data asynchronously.
The point is, if you haven't built the apk package, you can use it without any errors
The text was updated successfully, but these errors were encountered: