Jailbreak Detection Flutter Apps - flutter

I have added the Jail break detection for my Flutter app where I have used the below dependency,
trust_fall: ^1.0.4
So Its working as expected I have tested in the nox emulator outcome is app is crashing while opening that is what is expected and got the same. For this trust_fall dependency will require minSdkVersion 18 value should be over 16 in build.gradle.
But when I tried in the real device the app is crashing. So I commented the trust_fall dependency in pubspec.yaml and changed the minsdkVersion back to 16 then it opened correctly no crash.
I want to have Jailbreak check but its crashing in the real device, Any Solution for this??

You can check out other packages like flutter_jailbreak_detection and ing_app_security. These packages are updated.

Related

Flutter release apk not installing on Samsung A51

Any idea why flutter apk release file fails to install on a Samsung A51 device?
I've tried the following to solve the problem.
Uninstall previous app
From phone settings -> applications, and enabled the option 'Allow app from unknown source
Update phone operating system to latest version
But the problem continued.
The error says: problem parsing package
Usually, the problem occurs when targetSdkVersion in android/app/build.gradle is less than the Android version installed on your phone.
For example
The targetSdkVersion is 29 but if your phone has installed Android 10 (SDK 30), it will not be able to install the file.

Flutter build failing after switching from compileSdkVersion 30 to compileSdkVersion 31

I had an old project which I had released and the person I made it for wanted me to add notifications. I added the flutter messaging and flutter local notifications and updated the firebase dependencies accordingly. After this I tried to run the app but it said you have to upgrade the compileSdkVersion to 31. But this resulted in the following error.
Up till now I have tried upgrading my dart sdk, deleting the pubspec.lock file and running it again. I have also tried importing my project again after reinstalling flutter. The error just won't go away.

How to enable Multidex inside flutter which is added to existing android project as module

I have and android project, which I added flutter on it as module,
In my original android app, multidex is enabled, but this do not help me, when running the app in debug it's working normally, but when creating a release apk or even debug apk the FlutterFragment is appearing as white, like the engine did not attach.
Things I notice, 'flutter run --release' will ask me to support multidex, and will not run, updating the minSdkVersion to 21 and enabling multidex in .android/app/build.gradle then again 'flutter run --release' works perfect, but this have no effect on the host app because it's under .android which automatically build, and ignored by the host app.
Also I tried to search for how to update minSdkVersion to 21 instead of 16, but references lead to change in the .android which have no effect.
Hey you can do two thing
Update your flutter SDK version by running command
flutter upgrade
The new version of flutter(2.10) multidex support automatically.
simply pass the --multidex flag to flutter build appbundle or flutter build apk and your app will support multidex.
2.In your app folder inside android [project_folder]/app/build.gradle and add following lines.
defaultConfig {
...
multiDexEnabled true
}
and
dependencies {
...
implementation 'com.android.support:multidex:1.0.3'
}
After a lot of investigation, the reason was related to something in the entry point, which needed to add project name, referring to this link

how to ensure my flutter application is compatible with android 4.1?

i would like to make possible to install and use my flutter application on a phone which has a android OS version 4.1, but when i run my code on a simulator the result is :
i cannot open the app no matter how many times i try it.
and my api and sdk versions are : minSdkVersion 16 targetSdkVersion 29
is my api version the problem? play store says about this the minimum OS compatible is 4.1 but it does not work

My flutter app is not displaying in chrome when launched with no errors and when run to my android it gives me errors

The error says the number of method references in dex file cannot exceed 64.
I have tried changing the emulator I used and also changed how I launch the app, but no display still.
Try setting
minSdkVersion = 21
or higher in your gradle file and tell us if it fixes
The problem is with the multidex file of android.
Setting minSdkVersion to 21 or higher enable by default multidex. If you want to keep down the minsdk, you could also follow the answer that was given here:
How to enable multidexing with the new Android Multidex support library