🥞
FoodZone
  • Multivendor/Stores App Setup in Flutter
  • Inside Packages
  • Application Installation
  • Admin Panel Installations
  • Restaurant owner Application
  • Driver Application
  • Google Map API and Google Place Picker API Setup
  • Firebase Push notification Configurations
  • Payment GateWay Integrations
  • Add proguard-rules.pro file for live Payment Key
  • Change Theme Color and Logo
  • Change Application Font
  • Change Application Name
  • Change Application Icon
  • Required things of admin panel and application
  • Billing & Invoice Functionality
  • How to Resolve Android Stripe Error?
  • Localization/Language Modification
  • How to add or delete the google Admob
  • Important links
  • Acknowledgment
Powered by GitBook
On this page
  • Step 1 : Create file
  • Step 2: Assign that file to build.gredle
  • You can check this link.

Was this helpful?

Add proguard-rules.pro file for live Payment Key

In FoodZone and Grocers we have used Stripe, Paypal and RazorPay payment gateways for online transaction. For each payment we have used sandbox key for testing transactions.

Payment live key is sensitive data to we can not ask or we can not add any live key. For adding live key you must have to add proguard-rules.pro file at android side. without this file it might be possible that the app will not work or crashed on release build. For this you must have to follow bellow steps.

Step 1 : Create file

make a file name of proguard-rules.pro inside android>app that should be : android/app/proguard-rules.pro then paste below code inside proguard-rules.pro file

-keepclassmembers class * {
    @android.webkit.JavascriptInterface <methods>;
}

-keepattributes JavascriptInterface
-keepattributes *Annotation*

-dontwarn com.razorpay.**
-keep class com.razorpay.** {*;}

-optimizations !method/inlining/*

-keepclasseswithmembers class * {
  public void onPayment*(...);
  
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
# -keep class com.google.firebase.** { *; } // uncomment this if you are using firebase in the project
-dontwarn io.flutter.embedding.**
-ignorewarnings
}

Step 2: Assign that file to build.gredle

go to android>app>build.gradle and find buildTypes inside buildTypes>release add some lines

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
            minifyEnabled true
            useProguard true 
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
PreviousPayment GateWay IntegrationsNextChange Theme Color and Logo

Last updated 4 years ago

Was this helpful?

You can check this link.