Android Source Code Setup #
- Download the Fiberchat User app purchased package from Codecanyon. Open the source code (project folder/ fiberchat folder) in your preferred Code Editor by simply Drag & Drop the folder in vs code. We recommend to use VS Code, especially for flutter apps.
- You must be ready with your unique App label , Andoid App package name, Project folder name
- Rename the “fiberchat” folder name with your “project folder name”.
- Replace the default package name (com.fiberchat.fiberchat)/(com.tctech.fiberchat) with your android package name inside the following files:
- android/app/src/main/kotlin/com/fiberchat/fiberchat/MainActivity.kt
- android/app/src/main/res/values/strings.xml
- android/app/src/main/AndroidManifest.xml
- android/app/src/profile/AndroidManifest.xml
- android/app/src/debug/AndroidManifest.xml
- android/app/build.gradle
- Rename these folder names (fiberchat) with your project folder name in the following path:
- android/fiberchat_android.iml
- fiberchat.iml
- Rename these folder names as per your android app package name in the following path:
- android/app/src/main/kotlin/com/fiberchat/fiberchat
- Replace App label name “Fiberchat” with your “App Label name” in the following path:
- android/app/src/main/AndroidManifest.xml
android:label="Fiberchat"
- android/app/src/main/AndroidManifest.xml
Change Assets #
Replace the assets in the following paths with your assets with the same name & same size.
App Icon : #
- assets/appicon/appicon.jpg
Run the following command in vscode terminal to set the appicon automatically for android and ios :
flutter pub get
flutter pub run flutter_launcher_icons:main
Notification Icon (android only): #
- android/app/src/main/res/drawable/transparent.png
Replace the notification Label color in: android/app/src/main/res/values/color.xml
<color name="colorAccent">#06a54d</color>
Splash Screen : #
- assets/images/splash.jpeg
Please make sure the file name is splash.jpeg but not splash.jpg
Applogo (for login screen): #
- assets/images/applogo.png
Call Ringtone (for incoming call ringing): #
- assets/sounds/ringtone.mp3
- android/app/src/main/res/raw/ringtone.mp3
- assets/sounds/ringtone.caf
- assets/ios_assets/ringtone.caf
Please Note : Maximum ringtone duration should be less than 26 seconds.
Call Dialing Tone (when calling): #
- assets/sounds/callingtone.mp3
Change Colors #
Replace the following colors in : lib/Configs/app_constants.dart. with your desired colors keeping the same tone in each color (darken/lighten) for a good looking UI.
final fiberchatBlack = new Color(0xFF1E1E1E);
final fiberchatBlue = new Color(0xFF02ac88);
final fiberchatDeepGreen = new Color(0xFF01826b);
final fiberchatLightGreen = new Color(0xFF02ac88);
final fiberchatgreen = new Color(0xFF098b74);
final fiberchatteagreen = new Color(0xFFe9fedf);
final fiberchatWhite = Colors.white;
final fiberchatGrey = Color(0xff85959f);
final fiberchatChatbackground = new Color(0xffe8ded5);
const DESIGN_TYPE = Themetype.whatsapp;
const IsSplashOnlySolidColor = false;
const SplashBackgroundSolidColor = Color(0xFF01826b);
//applies this colors to fill the areas around splash screen. Color Code: 0xFF01826b for Whatsapp theme & 0xFFFFFFFF for messenger theme.
final statusBarColor = fiberchatDeepGreen;
final isDarkIconsinStatusBar =
false;
Setup App Configuration #
Setup basic mandatory configuration for your App inside: lib/Configs/app_constants.dart
const Appname ='Fiberchat'; //app name shown evrywhere with the app where required
const DEFAULT_COUNTTRYCODE_ISO = 'US'; //default country ISO 2 letter for login screen
const DEFAULT_COUNTTRYCODE_NUMBER = '+1'; //default country code number for login screen
Optional App Configuration #
Setup optional configuration for your App inside : lib/Configs/optional_constants.dart (We recommend, not changing it) :
const IsCallFeatureTotallyHide = false;
const Is24hrsTimeformat = true;
const int GroupMemberslimit = 500;
const int BroadcastMemberslimit = 500;
const int StatusDeleteAfterInHours = 24;
const IsLogoutButtonShowInSettingsPage = true;
const FeedbackEmail =''; //leave it blank if you will use admin app
const IsAllowCreatingGroups = true;
const IsAllowCreatingBroadcasts = true;
const IsAllowCreatingStatus = true;
const IsPercentProgressShowWhileUploading = true;
const int MaxFileSizeAllowedInMB = 60;
const int MaxNoOfFilesInMultiSharing = 10;
const int MaxNoOfContactsSelectForForward = 7;
//---- ####### Below Details Not neccsarily required unless you are using the Admin App, you can change from admin app directly:
const ConnectWithAdminApp = true;
const dynamic RateAppUrlAndroid = null;
const dynamic RateAppUrlIOS = null;
const TERMS_CONDITION_URL = 'YOUR_TNC';
const PRIVACY_POLICY_URL = 'YOUR_PRIVACY_POLICY';
const int ImageQualityCompress = 50;
const int DpImageQualityCompress = 25;
const bool IsVideoQualityCompress = true;
int maxChatMessageDocsLoadAtOnceForGroupChatAndBroadcastLazyLoading = 25;
int maxAdFailedLoadAttempts = 3;
const int timeOutSeconds = 50;
const IsShowNativeTimDate = true;
const IsShowDeleteChatOption = true;
const IsLazyLoadingChat = false; //## under development yet
const IsApplyBtoomNavBar = false; //## under development yet
const IsRemovePhoneNumberFromCallingPageWhenOnCall = false;
const OnlyPeerWhoAreSavedInmyContactCanMessageOrCallMe = false; //If this is true, then only contacts saved in my device can send a message or call me.
const DEFAULT_LANGUAGE_FILE_CODE = 'en'; //default language code if file is present is localization folder example-> en.json
const IsShowLanguageNameInNativeLanguage = false;
const IsAdaptiveWidthTab = false;
final loginPageTopColor = DESIGN_TYPE == Themetype.whatsapp ? fiberchatgreen : fiberchatWhite;
final loginPageBottomColor = DESIGN_TYPE == Themetype.whatsapp ? fiberchatDeepGreen : fiberchatWhite;
Set App Version Number (Android) #
1. Set android app version number inside : android/local.properties & further increment both version Name & Version code before every release build
flutter.versionName=1.0.0
flutter.versionCode=1
2. Set android app version number inside : pubspec.yaml & further increment both version Name & Version code before every release build
version: 1.0.0+1
Set Release key.jks Properties #
1. Generate a upload keystore, rename it to key.jks file and place it in the path : android/app/key.jks
2. Set the key properties in : android/key.properties
Change Font (optional) #
Fiberchat has a default Flutter font. If you want to set a new font. Please follow these steps:
- Get ready with your font file(s). Remove all blank spaces in names if any.
- Paste your (.otf) OR (.ttf) font file inside : assets/fonts folder
- Register the font at the end of pubspec.yaml file as shown below:
assets:
- assets/images/
- assets/sounds/
- assets/flags/
- lib/Services/localization/json_languages/
fonts:
- family: your_font_family_name
fonts:
- asset: assets/fonts/your_font_file_name.ttf
Save pubspec.yaml file. Run command : flutter pub get
4. Paste your “your_font_family_name” in -> lib/Configs/app_constants.dart
const FONTFAMILY_NAME = "your_font_family_name";