-
Notifications
You must be signed in to change notification settings - Fork 93
Create Custom Application
##Introduction Defined in \alfresco-mobile-android\build.gradle we provide a Gradle Build Variant named "custom". This product flavor allows any developer to create a custom version of the application with minimum code modification. It's a kind of playground.
NB : For more information on Gradle Build Variant
Inside project root folder, Open and edit gradle.properties
Rename all following keys
- APPLICATION_ID to org.custom.app
- PROVIDER_AUTHORITY to org.custom.provider
- ACCOUNT_ID to org.custom.account
- SYNC_ADAPTER to org.custom.provider.sync
Inside *alfresco-mobile-android\src\custom\res\values* folder, Open/create and edit string.xml
Rename
- app_name to Custom
(Optional) Redo the same for files in folder
- Deutsch: alfresco-mobile-android\src\custom\res\values-de\
- Spanish: alfresco-mobile-android\src\custom\res\values-es\
- French: alfresco-mobile-android\src\custom\res\values-fr\
- Italian: alfresco-mobile-android\src\custom\res\values-it\
- Japanse: alfresco-mobile-android\src\custom\res\values-ja\
- Simplified Chinese: alfresco-mobile-android\src\custom\res\values-zh-rCN\
Alfresco Application has 2 different applications icons:
- ic_application_icon.png which is the launcher icon used mostly outside the application.
- ic_application_logo.png which is the logo used inside the application.
Inside *alfresco-mobile-android\src\custom\res\drawable-xhdpi* folder, add/replace ic_application_icon.png and/or ic_application_logo.png
Redo the same for files in folder
- alfresco-mobile-android\src\custom\res\drawable-hdpi\
- alfresco-mobile-android\src\custom\res\drawable-mdpi\
####In Android Studio
- Open Build Variants View
- Select release for foundation project
- Select customRelease for alfresco-mobile-android project
- Wait the end of the automatic build
- Launch the application
- APK is available at Root project folder\alfresco-mobile-android\build\outputs\apk
- Your application file is : alfresco-mobile-android-custom-release-1.5.0-SNAPSHOT.apk
####In command line
- Open a Command Prompt in root project folder
- Tap and execute gradlew assembleCustomRelease
- Wait the end of the build
- Go to Root project folder\alfresco-mobile-android\build\outputs\apk
- Your application file is : alfresco-mobile-android-custom-release-1.5.0-SNAPSHOT.apk
####More informations