Installation
We recommend that you follow these steps before beginning development work on the Talawa mobile app.
Prerequisites
You must install the following applications beforehand on your system for best results.
- Talawa-API: The API system that the mobile app uses for accessing data.
- Talawa-admin: The system used by Administrators to manage user information. This is important as you will occasionally need to do administrative functions that cannot be done in the mobile app.
Each of these software application repositories have an INSTALLATION.md file that explains how install them. The Talawa-API INSTALLATION.md file will also show you the Organization URL to use when you first login to Talawa mobile.
Note: If you are a developer then you should setup your own local instances of these applications.
Installation for End Users
End users can install the apk file on their phones.
Note:
- Make sure you follow these steps on your phone.
- Please note that the release is provided only for Android. For iOS, you will still need to build the app yourself.
Please follow these steps:
- The
apkfile is automatically generated when we make updates to the code. It has the latest features of the application. - Head over to the release section of Talawa repository.
- You will find a release with the name of
Automated Android Release. - Scroll a bit and you will find a file named
app-release.apk. - Click on the link to download the file.
- Head over to the downloads of your browser and then click on
app-release.apkthere.- You will be prompted to install the app.
- Click on
Install.
- Once done, you can find
Talawain your apps list. - Start using it from right there.
Installation for Developers
Developers should follow these steps to install the application in their development environment.
Talawa Mobile App Setup
You'll need to set up the IDE and mobile device emulator on your local system and have access to a system running the Talawa API, which the mobile needs to access to operate properly.
- Development Environment: You'll need to have the following installed:
- API Environment: This part is very important.
- Make sure Talawa-API is up and running.
- You will need to enter the URL of the API server in the Talawa app when it first starts up. The URL could be active on a system you control or in our test environment. The Talawa-API INSTALLATION.md will provide that information.
- Google APIs (Optional): The app uses Google Maps API for venue selection. You will need to sign up for it if you want to test these features.
- Maps API Setup: Follow these steps:
- Go to Google Developers Console.
- Create a new project that you want to enable Google Maps on.
- Search
credentialsin the search bar and selectCredentialsin APIs & Services. Click onCreate credentialsand selectAPI key. Copy the key and replace it as said before. - Search
maps sdk for androidand select theGoogle Maps SDK for Androidin Marketplace. You can also searchmaps sdk for iosand select theGoogle Maps SDK for iOSin Marketplace for iOS devices. - Click
Enable.
- Mobile App Setup: Enter your API key in the:
android/app/src/main/AndroidManifest.xmlfile for Android.ios/Runner/AppDelegate.swiftfile for iOS.- Replace YOUR_KEY_HERE with your API key.
- Remember to remove the key before committing changes and replace again with YOUR_KEY_HERE.
- Maps API Setup: Follow these steps:
Mobile App Installation
We have tried to make the process simple. Here's what you need to do.
- In Android Studio
- Make sure you have installed the `Android SDK Command Line Tools"
- Navigate to Project Structure
- On Windows/Linux: Click File > Project Structure...
- On macOS: Click Android Studio > Settings... (or Preferences...) > Project Structure
- Select the SDK Location
- Apply and save the settings
- From the CLI
- Clone and change into the project.
$ git clone https://github.com/PalisadoesFoundation/talawa.git
$ cd talawa - The
.envfile contains the URL of the Talawa API instance that the app will use. There is a.env.examplefile that you can use as a starter.- Copy
.env.exampleto become.env$ cp .env.example .env - Edit the
.envfile and update the URL with that of the API. The default value will not work.- If you are running the Talawa mobile app in an emulator mode on your local system, then the IPv4 address to
127.0.0.1will be the required value.`API_URL=http://<IPv4>:4000/graphql` - If you are running the app on a tethered device on the same network as your development system running the API, then the IP address will need to be that of the network interface of your development system.
- If you are running the Talawa mobile app in an emulator mode on your local system, then the IPv4 address to
- Copy
- Next you'll need to ensure that you are running the correct version of Flutter. We recommend using FVM to ensure you are running the correct version of Flutter.
- Install FVM using the instructions on the FVM website
- Ensure you are using Flutter version
3.32.8
fvm use 3.32.8
- Install packages.
$ cd talawa_lint
$ fvm flutter pub get
$ cd ..
$ fvm flutter pub get - Run the
flutter doctorcommand to determine whether everything is OK.- Here is the specific command.
$ fvm flutter doctor - Fix any issues the command output suggests need rectification.
- Note: Though you may have setup an SDK in Android Studio, the configuration may have to be setup separately on the CLI.
- Here is an example SDK error:
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location. - You will need to run the
flutter config --android-sdkcommand to correct the CLI configuration. On a Linux based system this will typically be~/Android/Sdk/. Here is an example.$ fvm flutter config --android-sdk /PATH/TO/Android/Sdk/
- Here is an example SDK error:
- Note: Though you may have setup an SDK in Android Studio, the configuration may have to be setup separately on the CLI.
- Here is the specific command.
- For a first time installation, you will need to accept the Flutter licences agreements.
$ fvm flutter doctor --android-licenses - Run the application
- Using a virtual device
- Create and launch an Android Virtual Device
- Run the application
- Note: In some cases the run icon in your IDE may be disabled, and you'll need to use the CLI
$ fvm flutter run
- Using your phone
- Enable USB debugging
- Connect your phone
- Using a virtual device
- Start developing!
- Clone and change into the project.