Andriod Apps Installation
Andriod Apps Installation
To set the android app up, we need to download and install few frameworks that are used to
generate the Smartwaka android application.
INSTALLATION
Tranxit User Application:
1. Fork new repo from the base Smartwaka git and open project in android studio.
2. Open build.gradle from app:module
3. Don’t edit anything in –applicationId-- ie. ―com.tranxitpro‖ or change folder/package
names.
4. Just change the –applicationSuffix—
From: '.user'
To: '.<projectName>User'
5. Change the list of string credentials:
resValue "string", "app_name", ".<projectName>"
resValue "string", "google_map_key", "<Google Map from GoogleConsole>"
resValue "string", "FACEBOOK_APP_ID", "<FB Id from FacebookConsole>"
resValue "string", "ACCOUNT_KIT_CLIENT_TOKEN", "<FB Id from
FacebookConsole>"
resValue "string", "default_notification_channel_id", "fcm_default_channel"
resValue "string", "google_signin_server_client_id", "<G+ Key from GoogleConsole
>"
6. Change the list of project constants:
buildConfigField "String", "BASE_URL", '<BASE_URL from backend>'
buildConfigField "String", "BASE_IMAGE_URL", 'BASE_ IMAGE_URL from
backend'
buildConfigField "String", "TERMS_CONDITIONS", '<TERMS_CONDITIONS
from backend>'
buildConfigField "String", "CLIENT_SECRET", '<CLIENT_SECRET from backend
>'
buildConfigField "String", "CLIENT_ID", '<CLIENT_ID from backend >'
buildConfigField "String", "DEVICE_TYPE", '"android"'
buildConfigField "String", "STRIPE_PK", '<STRIPE_PK from backend >'
buildConfigField "String", "HELP_URL", '<HELP_URL from backend >'
buildConfigField "String", "FCM_SERRVER_KEY", ''<FCM_SERRVER_KEY from
Firebase console>''
8. In res folder change the app_icon and ic_push icons. If necessary change other icons.
9. Then change the colorPrimary, colorPrimaryDark, colorAccent, colorPrimaryText,
colorSecondaryText, window_background. If necessary change other colors.
10. Sycn and run the project. If there is no bug, then the new project is ready.
Tranxit Provider Application:
1. Fork new repo from the base tranxit git and open project in android studio.
2. Open build.gradle from app:module
3. Don’t edit anything in –applicationId-- ie. ―com.tranxitpro‖ or change folder/package
names.
4. Just change the –applicationSuffix—
From: '. provider'
To: '.<projectName> Provider'
5. Change the list of string credentials:
resValue "string", "app_name", ".<projectName>"
resValue "string", "google_map_key", "<Google Map from GoogleConsole>"
resValue "string", "FACEBOOK_APP_ID", "<FB Id from FacebookConsole>"
resValue "string", "ACCOUNT_KIT_CLIENT_TOKEN", "<FB Id from
FacebookConsole>"
resValue "string", "default_notification_channel_id", "fcm_default_channel"
resValue "string", "google_signin_server_client_id", "<G+ Key from GoogleConsole
>"
6. Change the list of project constants:
buildConfigField "String", "BASE_URL", '<BASE_URL from backend>'
buildConfigField "String", "BASE_IMAGE_URL", 'BASE_ IMAGE_URL from
backend'
buildConfigField "String", "TERMS_CONDITIONS", '<TERMS_CONDITIONS
from backend>'
buildConfigField "String", "CLIENT_SECRET", '<CLIENT_SECRET from backend
>'
buildConfigField "String", "CLIENT_ID", '<CLIENT_ID from backend >'
buildConfigField "String", "DEVICE_TYPE", '"android"'
buildConfigField "String", "STRIPE_PK", '<STRIPE_PK from backend >'
buildConfigField "String", "HELP_URL", '<HELP_URL from backend >'
buildConfigField "String", "FCM_SERRVER_KEY", ''<FCM_SERRVER_KEY from
Firebase console>''
7. Create/configure project in respective frameworks:
Google console: Enable necessary API:
o Maps SDK for Android
o Places SDK for Android
o Google+ API
o Roads API
o Google Cloud Messaging
o Firebase Remote Config API
o Geolocation API
o Update google_map_key into the project
o Update google_signin_server_client_id into the project
Firebase console:
o Configure project package and SHA1 key and get the google-services.json
o Update FCM_SERRVER_KEY key into the project
o Update firebase database rules: in dashboard -> database -> rules
{
"rules": {
".read": true,
".write": true
}
}
Facebook console:
o Update package name and key hash
o Update FACEBOOK_APP_ID into the project
o Update ACCOUNT_KIT_CLIENT_TOKEN into the project
8. In res folder change the app_icon and ic_push icons. If necessary change other icons.
9. Then change the colorPrimary, colorPrimaryDark, colorAccent, colorPrimaryText,
colorSecondaryText, window_background. If necessary change other colors.
10. Sycn and run the project. If there is no bug, then the new project is ready.
Respective console URLs are available below:
https://developers.facebook.com/apps/227306957774573/dashboard/
https://developers.facebook.com/apps/227306957774573/account-kit/settings/
https://console.developers.google.com/projectselector/apis/dashboard
https://console.firebase.google.com/
https://console.firebase.google.com/u/1/project/tranxitswiftbase/database/tranxitswiftbase
/rules
--Happy Coding--