Skip to content

Commit

Permalink
ADST-415 (#171)
Browse files Browse the repository at this point in the history
* app config json (#66)

* fixed simuataneously 2 open file issue (#67)

* Mobileapps-1013 (#68)

* update the view of preview screen for capture media

* Mobileapps-1016 (#69)

* fixed facet disappear issue

* Mobileapps 1020 (#70)

* component value 0 issue fixed when there is no entries

* uploading files, update search facet filter logic

* add selected facet chip on search

* codacy correction

* review correction

* fixed the chip display issue

* Mobileapps 1022 (#71)

Add localisation support to search filter.

* LOC-349 - partial fix Updated Android ADW strings in 5 languages (2 f… (#72)

* LOC-349 - partial fix Updated Android ADW strings in 5 languages (2 files per language)

* fixed build issue

* localization added for type facet queries

Co-authored-by: aman-alfresco <[email protected]>

* Corrected the typo.

* LOC-349_Second fix - Updated UI strings for Search folder values in 5… (#73)

* LOC-349_Second fix - Updated UI strings for Search folder values in 5 languages

* update limit character

Co-authored-by: aman-alfresco <[email protected]>

* localisation issue fixed (#74)

* fixed signout issue (#75)

* Mobileapps 1042 (#76)

* added KB suffix to the title of file size and content size, convert file size values from bytes to kb

* added KB unit for content size and file size

* created string.ext

* app extension for other apps added (#77)

* checking if session is available or not (#78)

* Mobileapps 1054 (#79)

Login user if session is expired

* Mobileapps-1055 (#80)

* showing files and folder

* review correction

* Mobileapps-1056 (#81)

* uploading files in root directory

* MOBILEAPPS-1057 (#82)

* showing child folders

* upload files in child folder (#83)

* MOBILEAPPS-1082 (#84)

* search enabled for extension folders,fixed app crash if user not loggedIn even for single time, fixed crash if user click on any file

* Mobileapps-1092 (#85)

* Fixed upload issue on session expire

* fixed issue show internet unavailable propmpt issue if no network (#86)

* fixed search folder issue (#87)

* fixed redirection if user not loggedIn (#88)

* Mobileapps-1098 (#89)

* fixed upload button disabled issue if there is no data

* fixed multiple dialog issue (#90)

* Mobileapps 1083 (#92)

* added localization strings

* update session unavailable string

* sync functionality added

* LOC-354 partial fix Localised files in ES (Spanish) (#93)

* LOC-354 partial fix Localised files in ES (Spanish)

* LOC-354 partial fix All 5 languages (DE, NL, IT, ES, FR) localized in… (#94)

* LOC-354 partial fix All 5 languages (DE, NL, IT, ES, FR) localized including fixes to Spanish

* fixed build issue

Co-authored-by: aman-alfresco <[email protected]>

* Mobileapps 1083 (#95)

* fixed trash and count issue

* fixed sync issue

* fixed percentage issue and spacing

* codacy correction

* removed unused code

* fixed localization (#96)

* Mobileapps 1126 (#98)

* created new folder button

* added create new folder feature on the extension

* enable global search for extension (#97)

* fixed contextual search issue (#99)

* fixed label in app config json (#100)

* Mobileapps 1109 (#101)

* added view for preview the image and video

* added preview for local files which are not uploaded yet on server

* Update UploadWorker.kt

Added space

* Moobileapps 1126 (#102)

* corrected the new folder position

* Mobileapps 1146 (#103)

* move class added

* move file and folder feature added

* change move button name (#105)

* Mobileapps 1153 (#104)

* added action for renaming the file and folders

* displayed previous values before editing

* code merged

* strings added

* codacy correction

* Mobileapps-1169 (#109)

* fixed issue of same folder is visible while moving in the list

* Mobileapps-1163 (#106)

* updated the order of list of actions

* update strings

* updated the rename popup dialog text (#107)

* added cancel functionality in extension screen (#108)

* Mobileapps-1157 (#110)

* fixed orientation crash

* resolved crash on search screen

* Mobileapps-1175 (#111)

* navigate to user on created folder screen while moving data, also restrict to move data to it's own path or sub folders.

* fixed navigation issue (#112)

* Mobileapps-1193 (#113)

* app closing bug on share extension while creating folder

* added create folder navigation on extension, fixed back navigation issue

* Mobileapps 1197 (#114)

* removed extension from file while renaming

* fixed title on search while sharing thorugh extension (#115)

* Mobileapps 1209 (#116)

* reduced file size

* reset commit (#118)

* reset commit (#119)

* Revert "fixed title on search while sharing thorugh extension (#115)" (#120)

This reverts commit 19409fc.

* Build issue fix (#121)

* build fix

* Build issue fix (#122)


* build fix

* Delete shareextension/src/main/res/values-night directory

* Delete colors.xml

* Delete themes.xml

* LOC-371_localised_UI (#123)


* Localized UI files for the ADW Android mobile app in 5 languages

* update localization (#124)

* Mobileapps 1240 (#126)

* updated versions

* Update build.yml

update jvm from 1.8 to 11

* removed unused code

* MOBILEAPPS-1236 (#127)

* add framework for the analytics

* codacy correction

* review correction

* MOBILEAPPS-1237 (#128)

* create events for analytics

* codacy correction

* Mobileapps 1238 (#129)

* added screen view events

* added Page View Events

* added Page View Events

* update folder name page view event

* fixed build issue

* MOBILEAPPS-1239 (#130)

* event added for API tracker

* Mobileapps 1276 (#132)

* API analytics success fixed

* MOBILEAPPS-1268 (#131)

* added task navigation

* Mobileapps 1270 (#136)

* added list task fragment

* updated icons for tasks

* removed unused code

* added background xml

* load next page

* added pagination for task list

* added localisation

* linked process api

* removed unused code

* codacy correction

* Mobileapps 1272 (#137)

* added task navigation

* Mobileapps 1294 (#135)

* changed analytics name as per client feedback

* updated analytics name

* update analytics name (#138)

* Update anaytics name (#139)

* update analytics name

* update color of priority

* Mobileapps 1309 (#140)

* added sorting and filters, removed grouping

* added chip filters for tasks and reset button to reset the filters, added analytics, added accessibility

* codacy correction

* Mobileapps 1312 (#141)


* applied filters and retrieving the task list results

* Mobileapps 1311 (#142)

* optimized code and added task detail screen controllers

* fixed accessibility focused on chips

* added details for tasks

* showing data on view screen until not get response from detail api

* added list comment screen

* adds comment and attachments on detail screen

* remove header if no comment available

* MOBILEAPPS-1304 (#144)

* added comment list and add comment also
* added no attached files view

* MOBILEAPPS-1371 (#145)

* fixed comment crash issue

* Mobileapps 1314 (#146)

* added screen to view all attached files related to a task

* added attachment screen and preview for attachment

* add analytics for attached files screen

* if the file is already available on the device then it will open its preview directly otherwise download it first.

* codacy correction

* Android 12 crash issue fixed on download the file (#148)

* MOBILEAPPS-1310 (#147)

* added functionality to complete the task

* Mobileapps 1377 (#149)

* working on read more issue

* fixed read more cut issue

* fixed no space read more issue

* Fixed issue If user cancel the downloading and then not able to see it's preview (#150)

* LOC-384 ANDROID UI updated in 5 languages (#151)

* LOC-384 ANDROID UI updated in 5 languages

* verified localisation

Co-authored-by: aman-alfresco <[email protected]>

* Loc 384 android UI app (#152)

* LOC-384 ANDROID UI updated in 5 languages

* LOC-384 - amends to 3 files for extra back slashes

Co-authored-by: aman-alfresco <[email protected]>

* MOBILEAPPS-1388 (#153)

* added client feedback

* removed readmore code

* added analytics for task complete

* Mobileapps 1388 (#154)

* fixed filter chip issue

* LOC-384 _ second round of updates to UI files in 5 languages (#155)

* added account screen navigation from task screen (#156)

* Account navigation (#157)

* added account screen navigation from task screen

* added account screen navigation from task screen

* updated localisation and bug fixing (#158)

* fixed trash issue (#159)

* LOC-384 - 3rd update to the UI in 5 languages (#160)

* added download feature on preview screen for task attachments (#161)

* added download feature on preview screen for task attachments

* codacy correction

* preview crash (#162)

* Mobileapps 1313 (#163)

* added dialog to create the task

* Mobileapps 1422 (#164)

* Added icon for the completed task

* Added description and completed date on the detail screen

* MOBILEAPPS-1449 (#165)

* managed UI for edit task

* added dialog for save progress and changed text of complete button

* build fix

* added body for show toast on Action interface

* Mobileapps 1315 (#166)

* added feature to update the task name and description

* added accessibility for update task name and description

* codacy correction

* removed unused code

* MOBILEAPPS-1404 (#168)

* added feature to save due date on task detail

* codacy correction

* Mobileapps 1455 (#167)

* fixing scroll issue

* Mobileapps 1410 (#169)

* added feature to save due date on task detail

* added api to fetch the APS user profile data (#171)

* MOBILEAPPS-1416 (#170)

* added search bar and back button for searching the user

* added feature to search user

* codacy correction

* codacy correction

* Mobileapps 1423 (#172)

* added feature to edit task assignee

* MOBILEAPPS-1453 (#174)

* post the save edit details of task to the server

* codacy correction

* message update for discard task changes

* Mobileapps 1469 (#175)

* added 2 lines for task title and open component on title tap

* added resource id for create task fab icon

* fixed radio button accessibility issue

* MOBILEAPPS-1430 (#176)

* added feature to delete the content releated to task
* codacy correction

* update localisation (#177)

* Mobileapps 1473 (#178)

* fixed mark as complete issue.

* fixed issue to not showing pop-up if there is no change

* removed unused sout

* Fixed me user issue (#180)

* fixed crash if APS user is not enabled (#181)

* MOBILEAPPS-1480 (#179)

* applied listener on delete icon for deleting the attachment related to task

* codacy correction

* Update TextViewExt.kt

* update priority text in dark mode

* review correction

* Mobileapps 1429 (#182)

* added attachment button on detail screen

* merged APS content entry to entry obj for creating the single db

* Uploading the captured files on server

* synced list on upload content

* synced list after uploading the content on aps

* added feature to upload attachments using media and files'

* synced files

* updated version

* fixed alignment issue

* codacy correction

* anaytics added

* added analytics

* Mobileapps 1461 (#184)

* added message while uploading the content

* fixed accesibility issue

* fixed due date issue (#185)

* fixed due date issue

* fixed the delete swapping

* codacy correction

* LOC-392_UI updates fro Android ADW 1.5.0 (#186)

* fixed overlapping issue (#187)

* update fab behavior (#188)

* fixed banner issue (#189)

* Mobileapps-1495 (#190)

* added localisation, showing message to the user if attachments is uploading before completiong the task, added 100mb file check

* fixed edit issue on detail screen (#191)

* Task detail edit issue (#192)

* fixed edit issue on detail screen

* fixed crash on search result screen when new folder created (#193)

* Fixed search crash (#194)

* fixed crash on search result screen when new folder created

* fixed back button navigation

* MOBILEAPPS-1566 (#196)

* added missing string for close button

* fixed build issue

* added accessibility for recent screen (#197)

* added accessibility text on settings page (#198)

* addded accessibility for task list screen component (#199)

* addded accessibility for file preview (#200)

* addded accessibility browse option (#201)

* MOBILEAPPS-1544 (#202)

* accessibility added for navigate folder

* codacy correction

* added accessibility for search screen (#203)

* LOC-401 - Updated UI for ADW Android 1.6 in 5 languages (#204)

* LOC-401 - Updated UI for ADW Android 1.6 in 5 languages

* merged main and fixed build issues

Co-authored-by: Amanpal Singh <[email protected]>

* Loc 401 android UI updates (#205)

* LOC-401 - Updated UI for ADW Android 1.6 in 5 languages

* merged main and fixed build issues

* LOC-401 - Amend 1 string for DE UI - ADW Android 1.6

Co-authored-by: Amanpal Singh <[email protected]>

* added url scheme (#206)

* MOBILEAPPS-1633 (#207)

* showing the viewer activity

* added preview if user login

* added preview for file if user not login

* update url changes

* update url scheme

* handled login scenarios

* codacy correction

* Mobileapps 1633 (#208)

* showing the viewer activity

* added preview if user login

* added preview for file if user not login

* update url changes

* update url scheme

* handled login scenarios

* codacy correction

* added back view on backpress

* handled not keeping data on backpress (#209)

* MOBILEAPPS-1661 (#210)

* get folder name from source to show as title on preview screen

* codacy correction

* codacy correction

* added param source set to true to enable response

* update preview title

* MOBILEAPPS-1298 (#211)

* fixed tab highlighted issue

* codacy correction

* update the download base url (#212)

* fixed title on personal files (#213)

* Mobileapps 1684 (#214)

* implemented offline search

* Mobileapps 1684 (#215)

* implemented offline search

* fixed sub folder search

* Revert "fixed sub folder search"

This reverts commit ff1e39f.

* Mobileapps 1700 (#217)

* fixed sub folder search

* added initial as me if logged in user commented in list (#218)

* MOBILEAPPS-1138 (#219)

* removed the auto rename folder from existing app

* removed the auto rename folder from existing app in share extension

* added private url changes

* fixed filter issue while sharing (#220)

* added localisation (#221)

* Mobileapps 1770 (#222)

* implemented show list of process

* added localization for tasks

* codacy correction

* added all status in the tasks filter (#223)

* fixed issue if process not enabled then dropdown should not be there (#224)

* MOBILEAPPS-1727 (#225)

* added option to start process if APS is enabled

* codacy correction

* Mobileapps 1727 (#226)

* added option to start process if APS is enabled

* codacy correction

* removed unnecessary code

* link content to processes (#227)

* link content to processes

* codacy correction

* MOBILEAPPS-1729 (#228)

* showing list of process definitions

* codacy correction

* enable process for files only (#229)

* change order of start process option (#230)

* start process will show only if user is enabled for APS (#231)

* fixed failure case (#232)

* fixed accessibility and scroll issue (#233)

* MOBILEAPPS-1730 (#234)

* added start form

* Mobileapps-1732 (#236)

* added duedate, priority, name and description components on process details

* codacy correction

* Mobileapps 1731 (#237)

* added search user group controller

* added search user and group for workflow

* codacy correction

* added test cases for component view model and search user group view model

* fixed build crash (#238)

* LOC-413 Fully updated UI ANDROID files in 5 languages including copyright string in auth. (#235)

* MOBILEAPPS-1735 (#239)

* uploaded attachment on the workflow

* added view all attachment screen

* codacy correction

* added content delete feature

* removed delete dialog and added process for offline files

* MOBILEAPPS-1734 (#240)

* showing assigne as user or group on the basis of selected workflow

* codacy correction

* MOBILEAPPS-1736 (#241)

* added dialog before starting workflow if attachments not uplaoded yet

* codacy correction

* Mobileapps 1737 (#242)

* added validations before starting workflow

* code optimized

* codacy correction

* version udpate

* fixed node title issue (#244)

* added UI for unavailable workflows (#243)

* MOBILEAPPS-1870 (#245)

* added account info api to extract source

* removed unnecessary libs

* codacy correction

* updated file in queue message

* Task assignee fix (#246)

* fixed assignee issue on task

* MobileAPPS-1817 (#247)

* added download and preview for acs linked aps content

* added download and preview for source content

* added layout changes

* download and preview attachments

* added required strings

* codacy correction

* fixed navigation (#248)

* MOBILEAPPS-1814 (#249)

* added details related to workflows

* codacy correction

* reomved white spaces

* Mobileapps 1821 (#250)

* added plus button to start workflow

* start workflow from add button without selecting any file

* added select assignee next to Assignee if not selected, updated task icons

* added list of tasks related to workflow (#251)

* LOC-439  ANDROID UI strings updated (#252)

* MOBILEAPPS-1813 (#253)

* added task-form detail for the workflow's task

* added details of task form

* change status place holder to choose one..

* requested changes

* codacy correction

* linked task list to detail screen (#254)

* linked task list to detail screen

* fixed build issue

* MOBILEAPPS-1902 (#255)

* added outcome UI and api integration

* added save-form and outcome api integration

* added checks before selecting outcone

* codacy correction

* fixed delete icon issue

* codacy correction

* MOBILEAPPS-1816 (#256)

* added claim and release for pooled processes

* codacy correction

* fixed files syncing issue (#257)

* time_stamp_added (#258)

* added date and time on task list

* added time stamp and UI change

* handled a few outcomes check

* show release and claim button

* codacy correction

* LOC-443_updated Android UI files in 5 languages for Mobile App 1.7 release (#259)

* Update build version (#260)

* fixed claim issue (#261)

* Update UI condition for tasks (#262)

* fixed claim issue

* udpate UI view

* fixed network issue (#264)

* Revert "fixed network issue (#264)" (#265)

This reverts commit 4f00420.

* Revert "Revert "fixed network issue"" (#266)

* Revert "Revert "fixed network issue (#264)" (#265)"

This reverts commit b3b7446.

* removed print statement

* fixed search crash (#267)

* MOBILEAPPS-1976 (#268)

* added long press gesture for the row to select multiple files

* codacy correction

* Mobileapps 1978 (#269)

* added select and deselect row using multiselection

* formated code

* added unit test cases

* fixed build issue

* updated code

* code correction

* Mobileapps 1978 (#270)

* added select and deselect row using multiselection

* formated code

* added unit test cases

* fixed build issue

* updated code

* code correction

* format code

* Mobileapps 1980 (#271)

* added header and count for multiple-selection

* added multi-select limit

* added limit test cases

* modified test cases

* MOBILEAPPS-1931 (#263)

* upgrade dependencies version

* change java version from 11 to 18

* update coil library

* coil library updated

* update version

* refactor code

* optimize imports

* fixed android 13 permission and navigation issue

* fixed uploading issue

* resolved conflicts

* fixed fab button visibility (#272)

* MOBILEAPPS-1982 (#273)

* added move and favorites option for multi selection

* added action start process, delete and offline

* code ammendments

* added test cases

* added offline action on offline screen

* disbale uplading files long gesture

* Mobileapps 2022 (#274)

* fixed tablet rotation issue

* merge main with branch

* MOBIELAPPS-1984 (#275)

* added feature to move multiple files together

* fixed space issue while creating the folder

* remove extra option from library actions

* added move action on top header

* added delete , restore and forever delete actions (#276)

* MOBILEAPPS-1986 (#277)

* added multi offline action

* fixed snackbar delayed issue after action and added multiple offline actions

* added strings

* fixed move issue

* MOBILEAPPS-2033 (#278)

* added multi action for favorite

* added action for start process and also added required options on sheet in multi-action (#279)

* fixed deletion issue and removed unused code (#280)

* MOBILEAPPS-2038 (#281)

* accessibility action sheet issue fixed

* fixed internet issue

* added localisation (#282)

* MOBILEAPPS-2027 (#284)

* fixed require session crash

* review correction

* MOBILEAPPS-2026 (#285)

* removed workflow status and comment issue, also fixed highlighted issue for multi-selection

* fixed comment issue

* MOBILEAPPS-2052 (#286)

* enable start workflow on preview screen

* added definiton error message

* MOBILEAPPS-2046 (#287)

* added max limit message and enable single action on offline

* added message on search and offline

* added offline actions

* MOBILEAPPS-2046 (#288)

* added max limit message and enable single action on offline

* added message on search and offline

* added offline actions

* fixed crash

* added session expire popup on task detail screen (#289)

* added allowable operations (#290)

* restrict app for rooted device (#291)

* MOBILEAPPS-2056 (#292)

* added creds in secure shared prefs

* savind credentials in secure way

* PMD implementation in GitHub action (#294)

* PMD implementation in GitHub action

* Update build.yml

* MOBIELAPPS-2121 (#295)

* fixed progress running infinite issue

* removed print statements

* MOBILEAPPS-2120 (#296)

* fixed move crash

* fixed move crash

* update version (#297)

* MNT-24096 (#298)

* disabled favourite feature below 23 version

* removed unnecessary code

* peer review correction

* code review fixes

* MOBILEAPPS-2137 (#322)

* MOBILEAPPS-2089 (#300)

* disabled favorite feature below 23 version

* json parsed and architecture created for dynamic form

* removed login changes

* removed commented code

* MOBILEAPPS-2091 (#302)

* added single-line text component

* fixed review correction

* MOBILEAPPS-2093 (#303)

* added multi-line-text component

* optimized code and added few params

* added number component (#304)

* Mobileapps 2145 (#305)

* added amount component

* added checks for empty

* added checks for float value

* code optimized

* Mobileapps 2139 (#306)

* added checkbox component

* added string resource

* added datee and time field (#307)

* added dropdown field (#308)

* added radio component field (#309)

* added readonly field (#310)

* ADST-28 (#311)

* added people field

* added people field

* ADST-26 (#312)

* added functional group field

* added ammendments

* set the size of checkbox

* ADST-44 (#313)

* retain data on scroll

* added hyperlink field

* ADST-44 (#314)

* retain data on scroll

* added hyperlink field

* added underline

* ADST-221 (#315)

* added hyperlink ammendments

* added default and custom outcomes

* added string resources

* added string resources

* ADST-35 (#316)

* added hostname check to redirect the URL

* code refactor

* added validation and disbaled buttons state

* Revert "ADST-35 (#316)" (#317)

This reverts commit 84ed440.

* ADST-35 (#318)

* added hostname check to redirect the URL

* code refactor

* added validation and disbaled buttons state

* update scenarios of required data

* ADST-259 (#319)

* added hostname check to redirect the URL

* code refactor

* added validation and disbaled buttons state

* update scenarios of required data

* color theme fixed

* removed space from FAB

* code optimized

* ADST-31 (#320)

* submit collected data to server

* code optimized

* ADST-23 (#321)

* submit collected data to server

* code optimized

* added UI for attachments

* added attach files component

* code optimize

* ADST-261 (#323)

* fixed crash

* optimize error handling

* add more sceanrio to error handling

* ADST-47 (#324)

* fixed crash

* optimize error handling

* add more sceanrio to error handling

* linked search screen

* added folder search screen

* get result from folder search

* ADST-49 (#325)

* fixed crash

* optimize error handling

* add more sceanrio to error handling

* linked search screen

* added folder search screen

* get result from folder search

* code optimized

* code optimized

* view process after creation

* ADST-286 (#326)

* added confirmation dialog if any of the file is not uploaded

* added bottom banner

* string files updated

* added empty files view (#327)

* ADST-286 (#328)

* updated syncing architecture

* added title of view workflow

* handle single or multiple selection

* view data process scenario updated

* fixed save issue

* ADST-326 (#329)

* localisation updated

* selected content show in process

* added taskview feedbacks

* update view color, and update title (#330)

* ADST-386 (#331)

* update folder flow

* able to view the attachments

* ADST-379 (#333)

* fixed multiline issue

* fix date format

* ADST-380 (#332)

* fixed invalid url crash

* code optimsation

* ADST-382 (#334)

* limit file to 10mb for uploading the data

* fixed orientation

* update strings (#335)

* added cross button on assignee selected (#336)

* update date format (#337)

* merge community code with enterprise

* Fixed delete icon issue (#338)

* fixed delete icon issue

* fixed message issue

* update color (#339)

* fix outcome issue (#340)

* Update group case (#341)

* fixed claim button issue

* update pooled scenario

* showing name of the folder on form after selecting

* add clear icons to reset fodler

* fixed date display

* fixed file issue

* fixed color of action button (#342)

* fixed disable isue (#343)

* ADST-431 (#344)

* added view for large text

* upadte date format

* added message if selected content is not uploaded

* fixed crash related to the test app

* fixed date issue and description crash

* ADST-431 (#345)

* update text color of action button

* review correction

* review correction

* added api error handling message

* added api error handling message

* localisation added

* ADST-431 (#346)

* remove limit text from view screen

* optimize code

* updated the string localisation (#347)

* added security for overlays (#170)

* update version file

---------

Co-authored-by: Gloria Camino <[email protected]>
Co-authored-by: Lovekesh Saxena <[email protected]>
Co-authored-by: Gloria Camino <[email protected]>
Co-authored-by: omkaryadv177 <[email protected]>
  • Loading branch information
5 people authored May 16, 2024
1 parent bb743c9 commit e1e453a
Show file tree
Hide file tree
Showing 188 changed files with 6,807 additions and 1,102 deletions.
17 changes: 13 additions & 4 deletions actions/src/main/kotlin/com/alfresco/content/actions/Action.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
import android.view.View
import androidx.annotation.StringRes
import com.alfresco.Logger
import com.alfresco.content.GetMultipleContents.Companion.MAX_FILE_SIZE_10
import com.alfresco.content.data.APIEvent
import com.alfresco.content.data.AnalyticsManager
import com.alfresco.content.data.Entry
Expand Down Expand Up @@ -49,10 +50,16 @@ interface Action {
bus.send(newAction)
} catch (ex: CancellationException) {
// no-op
if (entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_TASK &&
ex.message == ERROR_FILE_SIZE_EXCEED
) {
bus.send(Error(context.getString(R.string.error_file_size_exceed)))
when {
entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_TASK &&
ex.message == ERROR_FILE_SIZE_EXCEED -> {
bus.send(Error(context.getString(R.string.error_file_size_exceed)))
}

entry is Entry && (entry as Entry).uploadServer == UploadServerType.UPLOAD_TO_PROCESS &&
ex.message == ERROR_FILE_SIZE_EXCEED -> {
bus.send(Error(context.getString(R.string.error_file_size_exceed_10mb, MAX_FILE_SIZE_10)))
}
}
} catch (ex: Exception) {
sendAnalytics(false)
Expand All @@ -69,6 +76,7 @@ interface Action {
bus.send(Error(context.getString(R.string.error_duplicate_folder)))
}
}

else -> bus.send(Error(context.getString(R.string.action_generic_error)))
}
}
Expand Down Expand Up @@ -106,6 +114,7 @@ interface Action {
bus.send(Error(context.getString(R.string.error_duplicate_folder)))
}
}

else -> bus.send(Error(context.getString(R.string.action_generic_error)))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data class ActionCaptureMedia(
item.description,
item.mimeType,
entry.uploadServer,
observerId = entry.observerID,
)
}
repository.setTotalTransferSize(result.size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import android.view.View
import androidx.documentfile.provider.DocumentFile
import com.alfresco.content.ContentPickerFragment
import com.alfresco.content.GetMultipleContents
import com.alfresco.content.GetMultipleContents.Companion.MAX_FILE_SIZE_10
import com.alfresco.content.GetMultipleContents.Companion.MAX_FILE_SIZE_100
import com.alfresco.content.actions.Action.Companion.ERROR_FILE_SIZE_EXCEED
import com.alfresco.content.data.Entry
import com.alfresco.content.data.EventName
Expand All @@ -28,17 +30,18 @@ data class ActionUploadFiles(
private val repository = OfflineRepository()

override suspend fun execute(context: Context): Entry {
val result = ContentPickerFragment.pickItems(context, MIME_TYPES)
val result = ContentPickerFragment.pickItems(context, MIME_TYPES, entry.isMultiple)
if (result.isNotEmpty()) {
when (entry.uploadServer) {
UploadServerType.UPLOAD_TO_TASK, UploadServerType.UPLOAD_TO_PROCESS -> {
result.forEach {
val fileLength = DocumentFile.fromSingleUri(context, it)?.length() ?: 0L
if (GetMultipleContents.isFileSizeExceed(fileLength)) {
if (GetMultipleContents.isFileSizeExceed(fileLength, if (entry.observerID.isNotEmpty()) MAX_FILE_SIZE_10 else MAX_FILE_SIZE_100)) {
throw CancellationException(ERROR_FILE_SIZE_EXCEED)
}
}
}

else -> {}
}
withContext(Dispatchers.IO) {
Expand All @@ -48,6 +51,7 @@ data class ActionUploadFiles(
it,
getParentId(entry),
uploadServerType = entry.uploadServer,
observerId = entry.observerID,
)
}
repository.setTotalTransferSize(result.size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ data class ActionUploadMedia(
private val repository = OfflineRepository()

override suspend fun execute(context: Context): Entry {
val result = ContentPickerFragment.pickItems(context, MIME_TYPES)
val result = ContentPickerFragment.pickItems(context, MIME_TYPES, entry.isMultiple)
if (result.isNotEmpty()) {
when (entry.uploadServer) {
UploadServerType.UPLOAD_TO_TASK, UploadServerType.UPLOAD_TO_PROCESS -> {
result.forEach {
val fileLength = DocumentFile.fromSingleUri(context, it)?.length() ?: 0L
if (GetMultipleContents.isFileSizeExceed(fileLength)) {
if (GetMultipleContents.isFileSizeExceed(fileLength, if (entry.observerID.isNotEmpty()) GetMultipleContents.MAX_FILE_SIZE_10 else GetMultipleContents.MAX_FILE_SIZE_100)) {
throw CancellationException(ERROR_FILE_SIZE_EXCEED)
}
}
}

else -> {}
}
withContext(Dispatchers.IO) {
Expand All @@ -45,6 +46,7 @@ data class ActionUploadMedia(
it,
getParentId(entry),
uploadServerType = entry.uploadServer,
observerId = entry.observerID,
)
}
repository.setTotalTransferSize(result.size)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.alfresco.content.actions

import android.content.Context
import android.os.Bundle
import android.preference.PreferenceManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
Expand Down Expand Up @@ -83,6 +84,16 @@ class CreateActionsSheet : BottomSheetDialogFragment(), MavericksView {
private val viewModel: ActionCreateViewModel by fragmentViewModel()
private lateinit var binding: SheetActionCreateBinding

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
withState(viewModel) {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(requireContext())
val editor = sharedPrefs.edit()
editor.putBoolean(Settings.IS_PROCESS_UPLOAD_KEY, it.parent.observerID.isNotEmpty())
editor.apply()
}
}

override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ProcessDefinitionsSheet : BottomSheetDialogFragment(), MavericksView {

val intent = Intent(
requireActivity(),
Class.forName("com.alfresco.content.browse.processes.ProcessDetailActivity"),
Class.forName("com.alfresco.content.app.activity.ProcessActivity"),
)
intent.putExtra(Mavericks.KEY_ARG, processEntry)
startActivity(intent)
Expand Down
8 changes: 6 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
plugins{
plugins {
id('com.android.application')
id('kotlin-android')
id('kotlin-kapt')
Expand Down Expand Up @@ -54,6 +54,8 @@ android {
viewBinding = true
}



compileOptions {
coreLibraryDesugaringEnabled true
}
Expand Down Expand Up @@ -98,7 +100,7 @@ dependencies {
implementation project(':viewer')
implementation project(':shareextension')
implementation project(':move')

implementation project(':process-app')
implementation project(':data')
implementation libs.alfresco.content

Expand All @@ -119,6 +121,8 @@ dependencies {

implementation libs.coil.core
implementation libs.gson
implementation libs.compose.runtime
implementation libs.constraintlayout

coreLibraryDesugaring libs.android.desugar

Expand Down
17 changes: 14 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />

<application
Expand All @@ -20,6 +21,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.Alfresco"
tools:targetApi="q">
<activity
android:name=".activity.ProcessActivity"
android:exported="false" />
<activity
android:name=".activity.ExtensionActivity"
android:configChanges="locale|keyboardHidden|orientation|screenSize"
Expand Down Expand Up @@ -61,6 +65,14 @@
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="androidamw" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />

<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />

<data android:scheme="androidamw" />
</intent-filter>
</activity>
Expand Down Expand Up @@ -89,9 +101,8 @@
<activity
android:name=".activity.MoveActivity"
android:windowSoftInputMode="adjustNothing" />

<activity
android:name="com.alfresco.content.app.activity.TaskViewerActivity"
android:name=".activity.TaskViewerActivity"
android:configChanges="orientation|screenSize"
android:exported="false" />
</application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ class MainActivity : AppCompatActivity(), MavericksView, ActionMode.Callback {
editor.putBoolean(IS_PROCESS_ENABLED_KEY, it)
editor.apply()
}

if (savedInstanceState != null && viewModel.entriesMultiSelection.isNotEmpty()) {
enableMultiSelection(viewModel.entriesMultiSelection)
}
}

override fun onStart() {
Expand All @@ -132,11 +136,13 @@ class MainActivity : AppCompatActivity(), MavericksView, ActionMode.Callback {
MainActivityViewModel.NavigationMode.FOLDER -> {
bottomNav.selectedItemId = R.id.nav_browse
}

MainActivityViewModel.NavigationMode.FILE -> {
removeShareData()
if (!isNewIntent) checkLogin(data)
navigateToViewer(data)
}

MainActivityViewModel.NavigationMode.LOGIN -> navigateToLogin(data)
MainActivityViewModel.NavigationMode.DEFAULT -> checkLogin(data)
}
Expand Down Expand Up @@ -295,6 +301,7 @@ class MainActivity : AppCompatActivity(), MavericksView, ActionMode.Callback {
if (bottomNav.isVisible) {
bottomNav.visibility = View.GONE
}
MultiSelection.clearSelectionChangedFlow.tryEmit(false)
}

private fun disableMultiSelection() {
Expand All @@ -319,7 +326,9 @@ class MainActivity : AppCompatActivity(), MavericksView, ActionMode.Callback {
}

override fun onPrepareActionMode(mode: ActionMode?, menu: Menu?): Boolean {
if (viewModel.path.isNotEmpty() && viewModel.path == getString(com.alfresco.content.browse.R.string.nav_path_trash)) {
if ((viewModel.path.isNotEmpty() && viewModel.path == getString(com.alfresco.content.browse.R.string.nav_path_trash)) ||
navHostFragment?.navController?.currentDestination?.id == R.id.nav_offline
) {
menu?.findItem(R.id.move)?.isVisible = false
}
return true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MoveActivity : AppCompatActivity(), MavericksView {
setContentView(R.layout.activity_move)

if (intent.extras != null) {
entryObj = intent.getParcelableExtra(ENTRY_OBJ_KEY) as Entry?
entryObj = intent.getParcelableExtra(ENTRY_OBJ_KEY) as? Entry?
}

configure()
Expand All @@ -54,7 +54,9 @@ class MoveActivity : AppCompatActivity(), MavericksView {
val graph = navController.navInflater.inflate(R.navigation.nav_move_paths)
graph.setStartDestination(R.id.nav_move)
val bundle = Bundle().apply {
putParcelable(ENTRY_OBJ_KEY, entryObj)
if (entryObj != null) {
putParcelable(ENTRY_OBJ_KEY, entryObj)
}
}
navController.setGraph(graph, bundle)
setupActionToasts()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.alfresco.content.app.activity

import android.content.pm.ActivityInfo
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.NavHostFragment
import com.airbnb.mvrx.MavericksView
import com.alfresco.content.actions.Action
import com.alfresco.content.app.R
import com.alfresco.content.app.databinding.ActivityProcessBinding
import com.alfresco.content.app.widget.ActionBarController
import com.alfresco.content.app.widget.ActionBarLayout
import com.alfresco.content.common.BaseActivity

class ProcessActivity : BaseActivity(), MavericksView {

private lateinit var binding: ActivityProcessBinding
private lateinit var actionBarController: ActionBarController

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityProcessBinding.inflate(layoutInflater)
setContentView(binding.root)

if (!resources.getBoolean(R.bool.isTablet)) {
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
}

configureNav()
setupActionToasts()
}

private fun configureNav() {
val navHostFragment =
supportFragmentManager.findFragmentById(R.id.nav_host_fragment) as NavHostFragment
val navController = navHostFragment.navController
val inflater = navController.navInflater
val graph = inflater.inflate(R.navigation.nav_process_paths)
navController.setGraph(graph, intent.extras)
val actionBarLayout = findViewById<ActionBarLayout>(R.id.toolbar)
actionBarController = ActionBarController(actionBarLayout)
actionBarController.setupActionBar(this, navController)

actionBarLayout.toolbar.setNavigationOnClickListener { onBackPressed() }
}

private fun setupActionToasts() = Action.showActionToasts(
lifecycleScope,
binding.parentView,
binding.bottomView,
)

override fun invalidate() {
}
}
33 changes: 33 additions & 0 deletions app/src/main/res/layout/activity_process.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/parent_view"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">

<include layout="@layout/layout_toolbar" />

<fragment
android:id="@+id/nav_host_fragment"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:defaultNavHost="true" />

<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@android:color/white"
android:backgroundTint="?attr/separatorColor" />
<View
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@android:color/white"
android:backgroundTint="?attr/separatorColor"
android:visibility="visible" />

</LinearLayout>
Loading

0 comments on commit e1e453a

Please sign in to comment.