I am starting development of my first Flutter app and I would like to know if there is a way how to use breakpoints and logging in classes that are not written in Dart (either iOS or Android specific classes).
I didnt find any mention of platform specific logging in official docs
There are many plugin which can help you to put logs in flutter or if you want to make some custom logerUtils than you can also create your plugin and use in for you project it it very simple and you can find lots of refrence on the internet
also you can use this which provided by flutter as well
https://api.flutter.dev/flutter/foundation/debugPrint.html
Related
Right now we have a native application that had been launched to production. We want to use flutter but we don't want to rewrite the entire app, so we plan to use flutter for the upcoming new features and embed it as a module into the native app.
We have experienced some success following this guide:
https://docs.flutter.dev/development/add-to-app
But one thing that we haven't figured out is how to leverage the obfuscation feature that flutter offered. I have read this guide:
https://docs.flutter.dev/deployment/obfuscate
but it mentioned nothing on how we can apply it to a hybrid app. Reading the log of the release build though, it seems that the obfuscation has been applied somehow since I see something like "flutterR8". Yet I don't know of any way how I can verify it.
One more thing, the documentation mentioned "--split-debug-info" which should print out some kind of symbol mapping to re-trace the obfuscated stack trace, I wonder where can I find the file if I'm using the hybrid approach?
Thanks.
I wanted to sync my local DB with my server. In Android we have sync Adapter that does the work and make life easier. I would wonder if we have something similar in Flutter or how can I do that in flutter.
Sync-adapters are core Android components. Flutter cannot directly provide a replacement for them. However, flutter does provide a mechanism to use platform specific APIs called flutter plugin. And although their are a lot of plugins already present, their is still a bit lack of plugins providing such core platform support.
Ideally, in an android application, the sync adapters are background services which can be triggered by the OS itself in a separate process, so the simplest way would be to do the following :
Create a separate sync-adapter inside the android directory of your flutter app. Make sure you correctly follow all the requirements for the sync-adapter to work. The documentation is in here.
Create a simple plugin-mechanism using this to invoke android APIs corresponding to the sync-adapter.
Also note that all this code - Android sync-adapter, flutter-plugin and your flutter-app, can simply reside in current code base. You are NOT REQUIRED to create a separate "plugin" to actually use the plugin.
I generally like to automatically bake-in the results of a git describe --always --dirty in any website, app, etc I am developing so that I can easily trace behaviors. Right now, I can't figure out a way to get this in a React Native app.
I am using Android, but am certainly looking for a solution to both Android and iOS.
I found a way using a mix of other existing answers:
Call git-describe during the build to access from gradle
Call PackageManager to access the gradle config from Java
Then use a React NativeModule in Java to access from JS
Update (3 years later): Here's a minimal diff that shows how to implement in Android.
I cant find anything saying one way or the other. Looking through everything, theres no reason that it shouldnt, however I am new to developing on either android or ios, so Im not entirely sure of the different methods available and how they link with react-native and react-native-touch-id
The only thing I can find online is something from two years ago that states react-native-touch-id does not support android "yet". And I found another node package called react-native-touch-id-android which I am having trouble building
I've been able to use React Native Touch ID for both iOS and Android on the latest version of RN. Someone forked this repo to also allow the device passcode as a fallback.
https://github.com/tradle/react-native-local-auth
One of my friends suggested to use c++ support in Android studio in order to hide passwords. I have found tons of tutorials how to get started with ndk in android. But they are all outdated(2015) and everytime I try to use c++ in any way, Android studio crashes. Is there any way to do it in a simpler way now?
P.S./ I want to get rid of experimental plugin that every one uses.
Little off the question, storing passwords in the native layer does not ensure complete safety. A good hacker can get that as well. It is just that you add another additional layer so one has to dig deeper