* Added new upload activity that receives shared files from the gallery. Cards show and hide, plus titles are correct. Displayed thumbnails for the shared images
* Better handling of the view paging plus error handling for required fields.
* Code cleanup to make things more readable.
* Extracted a model from the category search fragment that can possibly be shared with the new upload activity.
* Added category selection to the combined upload screen.
* Cleanup before the home-stretch on the GUI.
* Adding license selection.
* Fixed build warnings + cleanup
* Start to support the dark theme.
* Work in progress to add quality checking.
* Fixing merge.
* GPSExtractor: optimized away the EXifInterface object
* Implemented submit functionality, temporarily fixed jacoco crash by disabling DUMMY UploadView object.
* Implemented uploading of categories along with the picture. The category screen now displays GPS and recent categories when nothing is searched.
* Implemented caching of files. Did some work on picture quality detection.
* Implemented too dark picture detection.
* Added a side card for zoom and map buttons along with pretty animations for stuff.
* Added duplicate image on commons checking and fixed files not getting proper file extensions in several places.
* Added support for map button and switched in-app upload buttons to UploadActivity
* Pretty pretty animations!
* Implemented zoom functionality for th background image. Just pinching on the image works instead of requiring buttons.
* Added multi-language descriptions with categories by region.
* Reimplemented the duplicate title checker and implemented a check against putting the same language twice in the description.
* Javadocs for Description and UploadPresenter, plus some general cleanup.
* Small code changes.
* Implemented login checks for the Upload screen.
* Implement receiving data from Nearby.
* Feature/permissions library (#1855)
* Added permission for Dexter, the runtime permission handling library
* [Preparing fir issue #1773] Added a utility function which would take the user to app settings screen where he could manually give us the required permission
* Added an alert dialog with positive and negative callback [Preparing fir issue #1773]
* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix#1697]
1. Used dexter to handle the external storage permission
2. Behaviour changes : When user tries to share(uppload) images to commons via MultipleShareActivity, following decision tree is followed
a. If the app has permission for external storage, normal upload operation is followed
b. If the app does not has the permission for external storage, dexter is used to ask for the same
c. If the user gives us the required permission, normal upload flow is proceeded
d. If the doesnot gives us the required permission a rationale dialog is shown with the appropriate message to let him know why we need the permission
e. If he presses okay, steps a-c are followed and if he presses cancel, we close the app.
f. If while asking for permission, the user chooses never ask again, then next time he tries to upload an image via MSA, the rational dialog follows the app setting screen where he could manually give us the required permission and the onActivityResult of same is handled
* Added a Constants class to handle request and result codes from one place and other related constants common to the all app elements
* replaced hardcoded strings ok and cancel in DialogUtil to string resources
* init permission rationale dialog in activities onCreate
* Code formatting, updated access modifiers wherever required, added javadocs for new methods created
* *shifted constants to app class
*Added JavaDocs in PermissionUtils
* removed class REQUEST_CODES from CommonsApplication and instead put the enclosing constants in the App class itself
* Made Codacy happy.
* Abstarcted permission acquisition into new class DexterPermissionObtainer
* Fixed Nearby upload detection
* Migrated bad picture detection from AsyncTask to RxJava.
* Removed ShareActivity and related dead code
* Removed dead or duplicate code from FileProcessor
* Added info button to title EditText
* Fixed the add description button not disappearing.
Added "Starting Upload" toast.
Added link to the license on final screen.
Made it so that the map button is hidden when image lacks gps coords.
* Support in app multiple uploads
* Minor changes to fix build
* Changes to fix pending issues with upload flow
* Fix display of similar image fragment
* When uploading several files at once the date is missing #1854 (#2)
* Bug fix issue #1854
* updated ContributionsDao to save create date, which it was not doing currently [it was instead saving current date]
* UploadItem accepts are dateCreated param
* Added a function in UploadModel, getFileCreatedDate which tries to fetched the file creaction date from all possible content providers.
* Fix pending issues in upload flow
* Make multiple uploads work for Google Photos
* Fix default state for upload activity
* Fix keyboard state for license screen
* Fix descriptions for uploads
* wip
* Fix language spinner
* Return to main activity from notifications activity on back button is pressed
* Make nearby info image a little far from nearby text, to prevent wrong clicks
* Delete Contributions Activity content to rewrite it
* Add layout for new Contributions Activity design
* Bind views
* Override auth cookie required
* Add tabs and fragments method
* Create ContributionsFragment which will hold ContributionsListFragment and MediaDetailsFragment
* Add NearbyFragment which will hold NearbyMapFragment and NearbyListFragment
* Add ContributionsActivityPagerAdapter inner class to manage view pager
* Create strings will be written on tabs for contributions and nearby
* Create setTabAndViewPagerSynchronisation method to sycn view pager and tab layout. If user swipe pages, tabs will also change (and vice versa)
* Add theme dependent background color for Drawer Layout of activity_contributions layout file
* Add theme dependent background color for tabs in main
* Create Contributions Fragment structure which will hold Media Detail Fragment and Contributions List Fragment
* Inifilate contributions list fragment view
* Create variables and methods to reuse and create Media Detils Fragment and Contributions List Fragment which will be inside Contribution Fragment
* Override cursor loader methods
* set MediaDetilsView fragment or ContributionListFragment according to users state
* Show details of an image when item is clicked
* Add delete and retry functionality, note: not tested yet
* Override media count methods
* Implement onBack Pressed settings
* Register and unregister datasetObservers
* Add contributin list fragment
* Add contribution list layout with FABs for camera and galerry
* Make sure we called onAuthAcquired from fragment after is is attached
* Create ContributionListViewUtils class to change visibility of views according to MediaDetailsFragment visiblity or their loading state
* Make number of uploads visible if contribution list is visible and number of uploads is uploaded. Progress bar is visible if contribution list is visible and number of uploads are uploading. Both invisible if Media Details Fragment is visible
* Return parent fragment instead of parent activity
* GetPagerFragment instead of getActivity since currently ContributionsFragment take over responsibility from ContributionsActivity
* Add contribution number next to tab text for contribution, as discussed in thread
* Remove number of uploads from contributions fragment since we moved it text of tab layout
* Add unread notifications asynctask to check unread notifications on background
* Save latest time user notification activity viewed
* Add shared preferences provider for latest notification activity visit time
* Add shared preferences provider for latest notification activity visit time
* Change notification icon (add blue dot) whenever a notification comes
* Recover notifications state on come back to contributions list from media details fragment
* Add date with year parameter to Notification class, because we will use it on comparasion of dates
* Check if user visited noifications activity after last notification came
* Add ation to notification icon
* Add nearby custom card view class
* Add card view to activity
* Add a button which will be displayed when nearby permission is not granted thus closest point can't be displayed on main screen. Besides, theme dependent click styles are added to button
* Add button click and permission request logic. Not: solve why location manager is null
* Inject location manager to activity instead
* Make card view dismissable with swip
* Add preference to disable or display closest nearby location
* Add a bugfix to set visibility of nearby notification cardview
* Add UI modifier methods to display notifications
* Modify getFromWikidataQuery method, so that based on the restunClosestResult boolean, we get only the closest nearby place, instead of fetching bunch of nearby places each time
* Make inner class vaariables public to reach them out of package
* Temporarily comment out icon setter methods since it crashes under API19
* Inject location manager
* Register location manager accoring to permission is given, then call nearby card view updater methods
* Change method calls loadAttractionsFromLocation by considering new parameter to decide between closest nearby call or an usual nearby call
* Add progress bar to nearby cardview
* Fix notifications string
* Hide nearby card view when Media Details is visible
* Change tab on nerby card view click
* Add hardcoded strings to strings.xml
* Move nearby activity to new nearby frament
* Add fragments for nearby list and map into outer nearby fragment
* Change options menu item according to tab view
* Make nearby card view invisible on swipe to nearby tab
* Use retained nearby fragment
* Add action to list sheet button
* This commit caused contrib list become invisible thus,
Revert "Use retained nearby fragment"
This reverts commit 86b3633b23.
* Make sure retained fragments are used for -both- nearby and contrib fragments
* Remove unrelated part added because of confusion, sorry
* Make sure nearbyNotificationCardView visibility works corrent
* Move nearby methods from nerby activity to nearby fragment, and add a lastLocationDuplicate variable to distinguish first time location from nearby fragment and nearby notification card on contributions activity
* Change activity.findViewByID lines with parentFragment.view.findViewById
* Remove toolbar from nearby fragment, since contributions activity already has
* Disable view pager swipe, since using map is very hard with swipe option of view pager
* Place progress bar inside nearby card notification to center
* Make sure using retaied nearby map fragment and nearby list fragment inside nearby fragment
* Update nearby notification content on slight location updates too, if it is first update after on resume. This prevented very long time loading progress bar
* Add case for no nearest pleace found, to prevent bug
* Prevent a possible bug can be caused from activity already killed
* Add click actions to FAB buttons in contributions list fragment. And arrange FAB margins
* Try to use a new location manager instance instead of using single object for both nearby map and nearby notification card view. Because location manager has a state mechanism which is designed to be called from a single point. When I call same methods from both nearby card view notification and nearby map, next update time of map etc. gets confused.
* Set radius to initial value on getFromWikidataQuery (when it is called for getting closest result to be used in nearby card view notification). Normally, algorithm increase radius, this technique works for nearby map but when it comes to finding nearest point, it can return null
* Add an enum to make card view visibility more stable, however, still there is a bug.
* Prevent some more nearby card view visilbility bugs, however still there is a bug
* Add some nullchecks for precaution
* Check nearby permission and refresh nearby view if nearby tab selected, othervise do nothing
* Send user to contrib tab if permission is denied after masrhmallow
* Change nearby fragment background so that progress bar is visible now
* Reduce code duplicate
* request location and gps permission from contribution nearby car view too
* Make sure using retained fragments
* Make sure Contrib list fragment is retained on orientation change
* Fix NPE at options menu
* Make fragment flag fancier, define it per fragment instance, instead of activity
* Fix Service leak and onsavedInstance NPE errrors both occured on orientation change
* Refresh nearby map on orientation change
* Remove unused imports, organise logs and add comments for NearbyMapFragment class
* Remove all references of nearby activity, since we don't use it anymore
* Remove unused imports, organise logs and add comments for Nearby Controller
* Remove unused imports, organise logs and add comments for NearbyFragment
* Remove unused imports, organise logs and add comments for NearbyNotificationCardView
* Change class name from Contributions Activity to Main Activity. Remove unused imports, organise logs and add comments for MainAtivity
* Remove extra spaces
* Remove unused imports and logs
* Remove unused imports, organise logs and add comments for LocationServiceManager
* Remove unused imports, organise logs and add comments for NotificationsActivity
* Remove unused imports, organise logs and add comments for Contributions Fragment
* bug fix nearby notification card dismiss/restore issue
* Change display_nearby_notification_summary varibale with Tap here to see the nearest place that needs pictures
* Add nearest place notification card dismiss toast
* Fix mistake made on previous commit, while fixing conflicts
* Set no data yet message invisible after contributions list is loaded
* Change FAB margins, according to Josephine's review
* Change FAB margins, according to Josephine's review
* Change contributions list background to white, to make FAB more visible
* Add infobutton with popup window next to nearby tba, to explain what does this tab do
* Change hambuger icon to back arrow when media details activity visible
* On back button clicked from nearby fragment, switch back to contributions fragment, instead of closing the app
* Check nearby card view visibility on coming back from media details activity
* Change notification icon with default vector supplied by android vector repos. If we use the one I drawn on inkscape, produced vector is not compatible with API level 19 and below. I couldn't find a proper solution, and decided to change icon
* Fix a possible NPE, caused by loation manager has Main activity reference after it is destroyed
* Change hardcoded string with var from string xml
* Make sure you listen storage permissions from contribution list framgent FABs
* Make sure you listened storage permissions for Neaby fragment buttons too
* Check NPEs causing crashes. Now it does not crash after coming back from settings activity
* Make notification icon compatible with <API19 devices, by drawing and using .png images
* Change back icon arrow vector with png
* Attempt to solve location manager caused memory leak
* Fix memory leaks and optimize imports
* Merge 2.9 release
* Enhancement issue #1862
Added on click to the "middle text" of a Notification item.
* Added comment #1862
Added comment to better explain method usage.
The reported issue is that in the Nearby activity, the app does not communicate that there is no internet connection. On investigation, it appears that a toast message does briefly display "No internet connection". It looks like other activities have implemented this same message within the snackbar instead. In order to have a consistent style of communication to the user, I removed the toast message and replace it with the snackbar message, as implemented in NotificationActivity.java.
Fix#1914 using getX() instead of getRawX() method and subtracted right padding to get the value. Now info dialog opens only on touch of the icon (#1915)
* Add bookmark star images
* Add bookmark item in navigation menu
* Add Activity for bookmarks
* Implement bookmarks viewpager
* Bookmark object and bookmarkDao
* Implement Bookmark Picture Fragment and Controller
* Implement image detail bookmark menu action UI
* contentProvider + config + dao rework
* Fix Dao and Content Provider crashes
* Link bookmark controllers and dao
* Implement bookmark location fragment, controller
* Add bookmark icon to location items
* Add empty bookmark list behavior and refactoring
* bookmarkLocation dao and contentProvider
* Fix bookmarks location crashes
* Rename and refactor classes
* Implement location list refresh
* Fix picture list update
When user come back from detail picture fragment, it solve the refresh bug.
* full test coverage
* Refactor bookmarks classes
* Fix bookmarks pictures loading
* Fix bookmark locations list display
* Java Documetation
* Fix Code review quality
* Fix DB version update
* Remove forgotten todo
* Update bookmark activity base class
Change from AuthenticatedActivity to BaseNavigationActivity
* Updated contribution screen to show message for no uploads by default, message gets wiped after any picture is inserted into the list
* Changed string as suggested
* Added margin
* Fix log reporting for release builds
* Fix logs for release builds
* wip
* Clean up the branch to exclude unrelated changes
* With java docs
* Uncomment quiz checker
* Check for external storage permissions before sending logs
* With more java docs
* Fix crash while zipping log files
* Do not log token and cookies
* Add instruction to restart app
* Bugfix/upload via share (#1920)
* Bug Fix#1878
* Added a java library to fetch the MIME type from input stream
* Fetch MIME type using this and use the contribution tag only when this fails:
* formatting changes, removed unused commented out line
* Versioning and changelog for v2.8.5 (#1923)
* Versioning for v2.8.5
* Update changelog.md
* Fix crash(es) due to uninitialized notification channel.
The notification channel needs to be created for API versions greater than
OR EQUAL to 26 (O). Also, the channel does not need to be reinitialized
if it already exists.
* Initialize notification channel when Service is created.
* Sweeping update of gradle and library versions.
This updates all of the dependencies of the project to their latest
versions. Everyone should please upgrade to the latest version of Android
Studio, update your build tools, and keep your version of Gradle and the
Kotlin plugin up to date.
* Update build tools in travis.
* Remove cruft and fix tests.
* Remove even more stuff.
* Reinstate instrumented tests.
* Update emulator image in travis.
* Localisation updates from https://translatewiki.net.
* Work towards eliminating string literals from code. (#1861)
String literals are being used in many places in the code, instead of
proper string resources which are automatically localized. This PR
replaces many of the string literals with pre-packaged resources, or will
add the appropriate string if necessary.
* Add button on image details to copy wikicode to clipboard (#1849)
* Add button on image details to copy wikicode to clipboard
* Make copy wikicode button width the same as the nominate deletion button width by filling in background
* Build fix
* Enable ProGuard for Debug and Release builds.
This enables ProGuard minification, which significantly shrinks the APK
(for both debug and release configurations) and vastly decreases the
method count.
* Add ProGuard rules for test builds.
Vector drawables do *not* belong in dpi-specific subfolders. They should
always be placed in the general "res/drawable" folder. This can actually
cause crashes on certain devices.
* Add Traceur for getting meaningful RxJava stack traces (#1832)
* Hotfix for overwrite issue in 2.8.0 (#1838)
* This solution is an hotfix for overrite issue came back on 2.8.0 version. What I did is checking the extension, and if it is null, adding .jpg suffix. Because commons files always have suffixes, and we should compare file names after adding suffixes. Othervise overrides are possible.
* Check if file title includes an extension already, by checking if is there any dot in it.
* Fix logic error
* Add uncovered tests
* Remove unecessary line breaks
* Make Javadocs more explicit
* Versioning and changelog for v2.8.2 (#1842)
* Versioning for v2.8.2
* Changelog for v2.8.2
* Add logs in wiki data edit and session refresh flow (#1874)
* Fix logout (#1875)
* [WIP] Refactor feedback and quiz to reduce possibility of NPE (#1881)
* Refactor feedback and quiz to reduce possibility of NPE
* Handle throwables in quiz checker
* Minor refactoring
* Set Traceur to only work in DEBUG mode (#1884)
* Bug fix for uploaded images count in achievements activity (#1885)
* Versioning and changelog for v2.8.3 (#1886)
* Update changelog.md
* Versioning for v2.8.3
* improve the algorithm for checking if the image is dark.
ImageUtils.java: algorithm used previously gave the 'TOO DARK' message for images that were perfectly valid.
The modified algorithm solves this problem.
* Clean up the code
* Added views for button skipLogin in layout-land and layout-xLarge, bug fix issue#1864
* xml improvisations
* Fixed string nominated_see_more [CDATA was used inappropriately]
* Added permission for Dexter, the runtime permission handling library
* [Preparing fir issue #1773] Added a utility function which would take the user to app settings screen where he could manually give us the required permission
* Added an alert dialog with positive and negative callback [Preparing fir issue #1773]
* Improvements in the way External Storage Permission is handled in MultipleShareActivity[Bug fix#1697]
1. Used dexter to handle the external storage permission
2. Behaviour changes : When user tries to share(uppload) images to commons via MultipleShareActivity, following decision tree is followed
a. If the app has permission for external storage, normal upload operation is followed
b. If the app does not has the permission for external storage, dexter is used to ask for the same
c. If the user gives us the required permission, normal upload flow is proceeded
d. If the doesnot gives us the required permission a rationale dialog is shown with the appropriate message to let him know why we need the permission
e. If he presses okay, steps a-c are followed and if he presses cancel, we close the app.
f. If while asking for permission, the user chooses never ask again, then next time he tries to upload an image via MSA, the rational dialog follows the app setting screen where he could manually give us the required permission and the onActivityResult of same is handled
* Added a Constants class to handle request and result codes from one place and other related constants common to the all app elements
* replaced hardcoded strings ok and cancel in DialogUtil to string resources
* init permission rationale dialog in activities onCreate
* Code formatting, updated access modifiers wherever required, added javadocs for new methods created
* *shifted constants to app class
*Added JavaDocs in PermissionUtils
* removed class REQUEST_CODES from CommonsApplication and instead put the enclosing constants in the App class itself
* Fix issue#1772
Add the CDATA tag to welcome_help_button_text string. Set the text of the corresponding textview using Html.fromHtml() function.
* Fix issue#1772
Add the CDATA tag to nominated_see_more string. Set the text of the corresponding textview using Html.fromHtml() function.
* Eliminate the use of Picasso.
This gets rid of the single use of the Picasso library (which was causing
the whole library to be imported and shipped) and replaces it with Glide.
TODO: replace this and the other instance(s) of Glide usage with Fresco,
or vice versa.
* Remove dependency on Glide.
This removes the dependency on Glide, as well as the SVG rendering
library, whose only purpose was to display a single SVG image in the
Notification activity. Unfortunately Android doesn't support SVG natively,
but Echo notifications have icons that are SVG formatted. Rather than
import a bunch of heavy libraries to support this single case of SVG
rendering, we can simply create a few local drawables that correspond to
the different types of notifications, and use them instead.
* Remove multidex!
Multidex is a killer of performance and should be avoided at all costs.
* Remove further unused bits.
* Remove final vestige of multidex.