College semester planner app on Android that generates a study/work schedule given course information, due dates that can be imported to Google Calendar
There are many activities in this app. The one containing this issue is YourCalendarActivity.
A for loop in YourCalendarActivity on each iteration attempts to:
convert a layout CalendarCanvas to a bitmap and write it to external storage Screenshots folder, and
update the layout by pressing a button in that activity NextMonthButton
Where from previous activities a start month and end month have been obtained and the methods NextMonthButton.onclick() and UpdateCalendarCanvas both update a calendar-style UI.
Things that are working OK:
The alternating operations of updating UI and writing to file are not occurring simultaneously. Semaphores and threads were used to ensure that writing to file only occurs after all UI changes are finished and given the log messages this seems to be working as intended.
The FileOutputStream creates a file as expected in a directory called Screenshots as directed. It looks crude but creates output--certainly can be improved.
External storage permissions are working fine. The appropriate clause has been included in the Manifest folder and as seen in the code permissions are also dynamically requested at runtime as required--a log message within isStoragePermissionGranted() indicates that the activity does in fact have permission, and that method of course will request permission if it is not available.
The remaining problems:
Only one file is outputted to the gallery, rather than the multiple that are expected as denoted by month_duration variable in the method. Sometimes when the gallery is opened after running this method it will look like it's loading the expected number of pictures but when it settles only one picture remains, always.
The single picture that is generated is always completely white. Previously, it was totally black save for the colored elements of the original layout CalendarCanvas.