App runs fine on debug mode but when releasing on Play Store force close Flutter
It's been almost two weeks, I released my app Food Today on Play Store and App Store and I created my landing page too using firebase hosting foodtoday.ungapps.com. It's quite fun to do everthing with firebase and flutter. It's like creating start up. I still need an idea to improve this app better again.
I have an expierence where I need to analayze my code that's on Play Store. Because the error only happened when I installed my app on Play Store. Fortunely I can check my app internally through Play Store developer. So I didn't need to release it to play store because It will much time waiting to be reviewed.
Now I've been waiting my app reviewed, It's almost two days. I think it's my first time waiting my app to be reviewed for almost more than one day. The update that I did is to add ML kit feature to detect food when user is trying to add food photo in discover food. Updated now it's been updated on Play Store. I usually write my blog a few days. So yesterday my app was still reviewed and now it's approved on Play Store. You can check it to know about the feature ML kit on discover food feature.
So what happened when my app crashed when installing the app from Play Store is because of package local notification flutter. So How do I know if the error is not showing anything related to local notification. Yes It's very confusing what I did is to debug my code on Play Store in internally mode. I used my own phone to install it from Play Store but Internally. So I can install the update immediately.
Because in flutter when you're doing "flutter run --release". It's not in app bundle mode but APK. The funny thing is not force close when I tried run the commend. So the besy way still is uploading it on Play Store internally and tested it in real device. Don't forget you need to register user tester to install app internally. I uploaded my app to internal mode dozens of time. Fortunely it's not like iOS the app size is only 20MB.
The screenshoot above where I uploaded my app bundle. After I tried to debug my code and run my app in internal because the error only happened in release mode and app bundle mode. I finally found the issue, it's because of local notification package where you need to include proguard file in build.gradle. In documentation in flutter package, it's not written so that it's confusing me to know what's really going on.
So that's it, I hope my expierence can help you if you face the same issue like me. Thanks for visiting my simple blog. Feel free to ask me anything, I hope you can try my new app called "Food Today". It's available on App Store and Play Store. You can get it on foodtoday.ungapps.com for free. Enjoy.