From d5b52481dbe94f89eea2c40fb84a1c9435c90b52 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sat, 7 Jan 2017 00:59:27 +0100 Subject: [PATCH 01/14] Add license #107 --- LICENSE.txt | 674 ++++++++++++++++++ app/build.gradle | 18 + .../gobees/apiaries/ApiariesScreenTest.java | 17 + .../com/davidmiguel/gobees/GoBeesApp.java | 18 + .../addeditapiary/AddEditApiaryActivity.java | 18 + .../addeditapiary/AddEditApiaryContract.java | 18 + .../addeditapiary/AddEditApiaryFragment.java | 18 + .../addeditapiary/AddEditApiaryPresenter.java | 18 + .../gobees/addeditapiary/LocationService.java | 18 + .../addedithive/AddEditHiveActivity.java | 18 + .../addedithive/AddEditHiveContract.java | 18 + .../addedithive/AddEditHiveFragment.java | 18 + .../addedithive/AddEditHivePresenter.java | 18 + .../gobees/apiaries/ApiariesActivity.java | 18 + .../gobees/apiaries/ApiariesAdapter.java | 18 + .../gobees/apiaries/ApiariesContract.java | 18 + .../gobees/apiaries/ApiariesFragment.java | 18 + .../gobees/apiaries/ApiariesPresenter.java | 18 + .../gobees/apiary/ApiaryActivity.java | 18 + .../gobees/apiary/ApiaryContract.java | 18 + .../gobees/apiary/ApiaryHivesFragment.java | 18 + .../gobees/apiary/ApiaryInfoFragment.java | 18 + .../gobees/apiary/ApiaryPresenter.java | 18 + .../gobees/apiary/HivesAdapter.java | 18 + .../gobees/camera/AndroidCamera.java | 18 + .../gobees/camera/AndroidCameraImpl.java | 18 + .../gobees/camera/AndroidCameraListener.java | 18 + .../gobees/camera/CameraFrame.java | 18 + .../gobees/camera/CameraHandlerThread.java | 18 + .../davidmiguel/gobees/camera/CameraView.java | 18 + .../gobees/camera/PreviewSizeComparator.java | 18 + .../davidmiguel/gobees/data/model/Apiary.java | 18 + .../davidmiguel/gobees/data/model/Hive.java | 18 + .../gobees/data/model/MeteoRecord.java | 18 + .../davidmiguel/gobees/data/model/Record.java | 18 + .../gobees/data/model/Recording.java | 18 + .../data/model/mothers/ApiaryMother.java | 18 + .../gobees/data/model/mothers/HiveMother.java | 18 + .../data/model/mothers/RecordMother.java | 18 + .../data/model/mothers/RecordingMother.java | 18 + .../gobees/data/source/GoBeesDataSource.java | 18 + .../data/source/cache/GoBeesRepository.java | 18 + .../data/source/local/DataGenerator.java | 18 + .../data/source/local/GoBeesDbConfig.java | 18 + .../source/local/GoBeesLocalDataSource.java | 18 + .../data/source/network/NetworkUtils.java | 18 + .../source/network/OpenWeatherMapUtils.java | 18 + .../source/network/WeatherDataSource.java | 18 + .../source/preferences/GoBeesPreferences.java | 18 + .../davidmiguel/gobees/hive/HiveActivity.java | 18 + .../davidmiguel/gobees/hive/HiveContract.java | 18 + .../gobees/hive/HiveInfoFragment.java | 18 + .../gobees/hive/HivePresenter.java | 18 + .../gobees/hive/HiveRecordingsFragment.java | 18 + .../gobees/hive/RecordingsAdapter.java | 18 + .../gobees/monitoring/MonitoringActivity.java | 18 + .../gobees/monitoring/MonitoringContract.java | 18 + .../gobees/monitoring/MonitoringFragment.java | 18 + .../monitoring/MonitoringPresenter.java | 18 + .../gobees/monitoring/MonitoringService.java | 18 + .../gobees/monitoring/MonitoringSettings.java | 18 + .../MonitoringSettingsFragment.java | 18 + .../gobees/recording/BeesMarkerView.java | 18 + .../gobees/recording/RecordingActivity.java | 18 + .../gobees/recording/RecordingContract.java | 18 + .../gobees/recording/RecordingFragment.java | 18 + .../gobees/recording/RecordingPresenter.java | 18 + .../gobees/settings/SettingsActivity.java | 18 + .../gobees/settings/SettingsFragment.java | 18 + .../gobees/utils/ActivityUtils.java | 18 + .../gobees/utils/BackClickHelperFragment.java | 18 + .../gobees/utils/BasePresenter.java | 18 + .../gobees/utils/BaseTabFragment.java | 18 + .../davidmiguel/gobees/utils/BaseView.java | 18 + .../gobees/utils/BaseViewHolder.java | 18 + .../gobees/utils/DateTimeUtils.java | 18 + .../gobees/utils/HourAxisValueFormatter.java | 18 + .../utils/ItemTouchHelperViewHolder.java | 18 + .../gobees/utils/RainValueFormatter.java | 18 + .../davidmiguel/gobees/utils/StringUtils.java | 18 + .../utils/TabsFragmentPagerAdapter.java | 18 + .../gobees/utils/TempValueFormatter.java | 18 + .../gobees/utils/WeatherUtils.java | 18 + .../gobees/utils/WindValueFormatter.java | 18 + .../davidmiguel/gobees/video/BeesCounter.java | 18 + .../gobees/video/ContourBeesCounter.java | 18 + .../processors/BackgroundSubtractor.java | 18 + .../gobees/video/processors/Blur.java | 18 + .../video/processors/ContoursFinder.java | 18 + .../gobees/video/processors/Morphology.java | 18 + .../video/processors/VideoProcessor.java | 18 + app/src/main/res/layout/addeditapiary_act.xml | 18 + .../main/res/layout/addeditapiary_frag.xml | 18 + app/src/main/res/layout/addedithive_act.xml | 18 + app/src/main/res/layout/addedithive_frag.xml | 18 + app/src/main/res/layout/apiaries_act.xml | 18 + app/src/main/res/layout/apiaries_frag.xml | 18 + .../main/res/layout/apiaries_list_item.xml | 18 + app/src/main/res/layout/apiary_act.xml | 18 + app/src/main/res/layout/apiary_hives_frag.xml | 18 + .../res/layout/apiary_hives_list_item.xml | 18 + app/src/main/res/layout/apiary_info_frag.xml | 18 + app/src/main/res/layout/hive_act.xml | 18 + app/src/main/res/layout/hive_info_frag.xml | 18 + .../main/res/layout/hive_recordings_frag.xml | 18 + .../res/layout/hive_recordings_list_item.xml | 18 + app/src/main/res/layout/monitoring_act.xml | 18 + app/src/main/res/layout/monitoring_frag.xml | 18 + app/src/main/res/layout/nav_header.xml | 18 + app/src/main/res/layout/recording_act.xml | 18 + .../res/layout/recording_bees_marker_vew.xml | 18 + app/src/main/res/layout/recording_frag.xml | 18 + app/src/main/res/layout/settings_act.xml | 18 + app/src/main/res/menu/apiaries_frag_menu.xml | 18 + app/src/main/res/menu/apiary_frag_menu.xml | 18 + app/src/main/res/menu/apiary_item_menu.xml | 18 + app/src/main/res/menu/drawer_actions.xml | 18 + app/src/main/res/menu/hive_frag_menu.xml | 18 + app/src/main/res/menu/hive_item_menu.xml | 18 + app/src/main/res/menu/recording_frag_menu.xml | 18 + app/src/main/res/menu/recording_item_menu.xml | 18 + app/src/main/res/values-w820dp/dimens.xml | 18 + app/src/main/res/values/arrays.xml | 18 + app/src/main/res/values/colors.xml | 18 + app/src/main/res/values/dimens.xml | 18 + app/src/main/res/values/strings.xml | 18 + app/src/main/res/xml/general_settings.xml | 18 + app/src/main/res/xml/monitoring_settings.xml | 18 + .../com/davidmiguel/gobees/Injection.java | 18 + .../com/davidmiguel/gobees/TestUtils.java | 17 + .../AddEditApiaryPresenterTest.java | 17 + .../addedithive/AddEditHivePresenterTest.java | 17 + .../apiaries/ApiariesPresenterTest.java | 17 + .../gobees/apiary/ApiaryPresenterTest.java | 17 + .../source/cache/GoBeesRepositoryTest.java | 17 + .../network/OpenWeatherMapUtilsTest.java | 17 + .../gobees/hive/HivePresenterTest.java | 17 + .../recording/RecordingPresenterTest.java | 17 + .../gobees/utils/DateTimeUtilsTest.java | 17 + .../utils/HourAxisValueFormatterTest.java | 17 + .../gobees/utils/StringUtilsTest.java | 17 + .../gobees/video/ContourBeesCounterTest.java | 17 + .../gobees/video/OpenCvBaseTest.java | 17 + .../video/processors/ProcessorsTest.java | 17 + build.gradle | 18 + docs/img/licenses_compatibility.docx | Bin 0 -> 24531 bytes docs/img/licenses_compatibility.png | Bin 0 -> 12935 bytes 147 files changed, 3250 insertions(+) create mode 100644 LICENSE.txt create mode 100644 docs/img/licenses_compatibility.docx create mode 100644 docs/img/licenses_compatibility.png diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..c65825e3 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/app/build.gradle b/app/build.gradle index 07e9d400..36d881c2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + apply plugin: 'com.android.application' apply plugin: 'jacoco-android' apply plugin: 'realm-android' diff --git a/app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ApiariesScreenTest.java b/app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ApiariesScreenTest.java index 6ee5e41e..9888cd5d 100644 --- a/app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ApiariesScreenTest.java +++ b/app/src/androidTest/java/com/davidmiguel/gobees/apiaries/ApiariesScreenTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.apiaries; import android.support.test.rule.ActivityTestRule; diff --git a/app/src/main/java/com/davidmiguel/gobees/GoBeesApp.java b/app/src/main/java/com/davidmiguel/gobees/GoBeesApp.java index 2edb45a3..5b26f71d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/GoBeesApp.java +++ b/app/src/main/java/com/davidmiguel/gobees/GoBeesApp.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees; import android.app.Application; diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java index 5a9ccb8a..7edd47dd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addeditapiary; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java index 541e331c..379dc201 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addeditapiary; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java index 855b7a7d..aded7055 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addeditapiary; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java index 4f4fae09..854598df 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addeditapiary; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/LocationService.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/LocationService.java index ae9fa196..c44b8a6a 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/LocationService.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/LocationService.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addeditapiary; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveActivity.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveActivity.java index 8d53c922..220207f3 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addedithive; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java index 6fb4146f..a4aa0110 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addedithive; import com.davidmiguel.gobees.utils.BasePresenter; diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java index cc6ba955..5306cf2f 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addedithive; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java index 3c7d5d89..b404a988 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.addedithive; import com.davidmiguel.gobees.data.model.Hive; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesActivity.java b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesActivity.java index 68a87a5f..e651b6c4 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiaries; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesAdapter.java b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesAdapter.java index adcd3ffe..32274ace 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesAdapter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesAdapter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiaries; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesContract.java b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesContract.java index 4117a321..f0959719 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiaries; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesFragment.java index 53a905de..8b8f0161 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiaries; import android.content.Intent; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesPresenter.java b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesPresenter.java index 0543475b..f0999cb0 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiaries/ApiariesPresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiaries; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java index 30440f1e..161a6b1a 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java index 960fcbbe..d1cf6766 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java index 1398e610..1e6c2d83 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.content.Intent; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java index 8413b151..d98c045b 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java index b8863e43..9f6449f6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java b/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java index d7023358..c619b0c5 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.apiary; import android.graphics.Color; diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCamera.java b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCamera.java index c580e934..057e1d43 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCamera.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCamera.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraImpl.java b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraImpl.java index 1f1cef61..301af6dd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraImpl.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraImpl.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; import android.graphics.SurfaceTexture; diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraListener.java b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraListener.java index 47bf8be6..a5bd4244 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraListener.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/AndroidCameraListener.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/CameraFrame.java b/app/src/main/java/com/davidmiguel/gobees/camera/CameraFrame.java index 4c7810aa..8aab5c29 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/CameraFrame.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/CameraFrame.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; import org.opencv.core.Mat; diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/CameraHandlerThread.java b/app/src/main/java/com/davidmiguel/gobees/camera/CameraHandlerThread.java index 19287b64..ec8c7ab5 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/CameraHandlerThread.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/CameraHandlerThread.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; import android.os.Handler; diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/CameraView.java b/app/src/main/java/com/davidmiguel/gobees/camera/CameraView.java index 9d837145..b59ee3e6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/CameraView.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/CameraView.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/camera/PreviewSizeComparator.java b/app/src/main/java/com/davidmiguel/gobees/camera/PreviewSizeComparator.java index 9e348870..dc5621f7 100644 --- a/app/src/main/java/com/davidmiguel/gobees/camera/PreviewSizeComparator.java +++ b/app/src/main/java/com/davidmiguel/gobees/camera/PreviewSizeComparator.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.camera; import android.hardware.Camera; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/Apiary.java b/app/src/main/java/com/davidmiguel/gobees/data/model/Apiary.java index 14f640cd..3a89ffab 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/Apiary.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/Apiary.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java b/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java index 21856212..b325f82c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java b/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java index a0fbefc3..d12ce90e 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model; import android.support.annotation.Nullable; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/Record.java b/app/src/main/java/com/davidmiguel/gobees/data/model/Record.java index 8d9c6abd..1d1f09dd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/Record.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/Record.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/Recording.java b/app/src/main/java/com/davidmiguel/gobees/data/model/Recording.java index 107b219c..77f3e877 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/Recording.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/Recording.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model; import java.util.Date; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java index 463f2354..556a88ba 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model.mothers; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java index a7dcdb03..29cf0489 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model.mothers; import com.davidmiguel.gobees.data.model.Hive; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordMother.java index ebfc985d..ec2689ee 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordMother.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model.mothers; import com.davidmiguel.gobees.data.model.Record; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordingMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordingMother.java index 32df261b..e5635fab 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordingMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/RecordingMother.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.model.mothers; import com.davidmiguel.gobees.data.model.Record; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java index cd7bebbd..f2b56635 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java b/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java index bf36f231..c6eedad2 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.cache; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/local/DataGenerator.java b/app/src/main/java/com/davidmiguel/gobees/data/source/local/DataGenerator.java index 12493a25..57e8081f 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/local/DataGenerator.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/local/DataGenerator.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.local; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesDbConfig.java b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesDbConfig.java index 54313e07..9774ca1e 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesDbConfig.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesDbConfig.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.local; import io.realm.RealmConfiguration; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java index a5890df1..d70085e1 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.local; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/network/NetworkUtils.java b/app/src/main/java/com/davidmiguel/gobees/data/source/network/NetworkUtils.java index 501116c9..46dd2700 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/network/NetworkUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/network/NetworkUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.network; import android.net.Uri; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java b/app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java index 7b5b440c..da3778c9 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.network; import com.davidmiguel.gobees.data.model.MeteoRecord; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/network/WeatherDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/network/WeatherDataSource.java index 9fdc0e12..6cc13eff 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/network/WeatherDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/network/WeatherDataSource.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.network; import android.os.AsyncTask; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java b/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java index 77856896..e0279081 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.data.source.preferences; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java index 7ca59d6a..0eed8a97 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java index 2f03c6cf..7f6ceb11 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.content.Intent; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java index 9d3472b0..f10573e4 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java index 40789f78..279f8f5b 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java index ffee444e..c3f40c65 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.content.DialogInterface; diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/RecordingsAdapter.java b/app/src/main/java/com/davidmiguel/gobees/hive/RecordingsAdapter.java index cc28c640..e037b280 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/RecordingsAdapter.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/RecordingsAdapter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.hive; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringActivity.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringActivity.java index 026135b9..c69b5c5f 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringContract.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringContract.java index 3f4a63c6..4d812668 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import com.davidmiguel.gobees.utils.BasePresenter; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java index 35cc51ef..2f20850a 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import android.app.Activity; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringPresenter.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringPresenter.java index d1143790..99c6ac93 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringPresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import com.davidmiguel.gobees.video.BeesCounter; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringService.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringService.java index 9f865748..de659bef 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringService.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringService.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import android.app.Notification; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettings.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettings.java index fcd32121..aecd3f72 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettings.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettings.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import com.davidmiguel.gobees.video.BeesCounter; diff --git a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java index bcfa25c8..35284920 100644 --- a/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/monitoring/MonitoringSettingsFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.monitoring; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/recording/BeesMarkerView.java b/app/src/main/java/com/davidmiguel/gobees/recording/BeesMarkerView.java index efddf39a..a7fecce4 100644 --- a/app/src/main/java/com/davidmiguel/gobees/recording/BeesMarkerView.java +++ b/app/src/main/java/com/davidmiguel/gobees/recording/BeesMarkerView.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.recording; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingActivity.java b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingActivity.java index 7cdd618b..5fcd1c0f 100644 --- a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.recording; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingContract.java b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingContract.java index f80ade8a..61c174c2 100644 --- a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingContract.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.recording; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingFragment.java b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingFragment.java index 34dbd480..2497c328 100644 --- a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.recording; import android.graphics.Color; diff --git a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingPresenter.java b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingPresenter.java index 4a925c7b..6186e94b 100644 --- a/app/src/main/java/com/davidmiguel/gobees/recording/RecordingPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/recording/RecordingPresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.recording; import com.davidmiguel.gobees.data.model.Recording; diff --git a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsActivity.java b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsActivity.java index d89efafd..96bd3ed8 100644 --- a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsActivity.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.settings; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java index ee9dc759..9cff7f0d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.settings; import android.os.Bundle; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/ActivityUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/ActivityUtils.java index df0ea6d0..e92edd39 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/ActivityUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/ActivityUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/BackClickHelperFragment.java b/app/src/main/java/com/davidmiguel/gobees/utils/BackClickHelperFragment.java index 398d09bf..0033abdc 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/BackClickHelperFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/BackClickHelperFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/BasePresenter.java b/app/src/main/java/com/davidmiguel/gobees/utils/BasePresenter.java index 5db65e22..e82ebb31 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/BasePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/BasePresenter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; public interface BasePresenter { diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/BaseTabFragment.java b/app/src/main/java/com/davidmiguel/gobees/utils/BaseTabFragment.java index 4b18915a..a33a3ed0 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/BaseTabFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/BaseTabFragment.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/BaseView.java b/app/src/main/java/com/davidmiguel/gobees/utils/BaseView.java index 9601c7cc..9c0d8c0d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/BaseView.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/BaseView.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/BaseViewHolder.java b/app/src/main/java/com/davidmiguel/gobees/utils/BaseViewHolder.java index d943c3cd..b93577c1 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/BaseViewHolder.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/BaseViewHolder.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/DateTimeUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/DateTimeUtils.java index a390ba9b..1b1f37a8 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/DateTimeUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/DateTimeUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import java.util.Calendar; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/HourAxisValueFormatter.java b/app/src/main/java/com/davidmiguel/gobees/utils/HourAxisValueFormatter.java index e5434979..7c60d29d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/HourAxisValueFormatter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/HourAxisValueFormatter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import com.github.mikephil.charting.components.AxisBase; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/ItemTouchHelperViewHolder.java b/app/src/main/java/com/davidmiguel/gobees/utils/ItemTouchHelperViewHolder.java index d79a762e..c9b34142 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/ItemTouchHelperViewHolder.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/ItemTouchHelperViewHolder.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/RainValueFormatter.java b/app/src/main/java/com/davidmiguel/gobees/utils/RainValueFormatter.java index c17f064a..803895fd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/RainValueFormatter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/RainValueFormatter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import com.github.mikephil.charting.data.Entry; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/StringUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/StringUtils.java index 16e1921d..91501165 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/StringUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/StringUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; /** diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/TabsFragmentPagerAdapter.java b/app/src/main/java/com/davidmiguel/gobees/utils/TabsFragmentPagerAdapter.java index 42b370b5..1418ee88 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/TabsFragmentPagerAdapter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/TabsFragmentPagerAdapter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/TempValueFormatter.java b/app/src/main/java/com/davidmiguel/gobees/utils/TempValueFormatter.java index 8b6910fe..4f3b8e00 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/TempValueFormatter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/TempValueFormatter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import com.github.mikephil.charting.components.AxisBase; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java index 1e522c61..27b3386c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import android.content.Context; diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/WindValueFormatter.java b/app/src/main/java/com/davidmiguel/gobees/utils/WindValueFormatter.java index 52d5a0df..655b086c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/WindValueFormatter.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/WindValueFormatter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.utils; import com.github.mikephil.charting.data.Entry; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/BeesCounter.java b/app/src/main/java/com/davidmiguel/gobees/video/BeesCounter.java index 23171e48..efd44798 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/BeesCounter.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/BeesCounter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video; import org.opencv.core.Mat; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/ContourBeesCounter.java b/app/src/main/java/com/davidmiguel/gobees/video/ContourBeesCounter.java index 3855bdf3..7dbc11f6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/ContourBeesCounter.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/ContourBeesCounter.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/processors/BackgroundSubtractor.java b/app/src/main/java/com/davidmiguel/gobees/video/processors/BackgroundSubtractor.java index 43b70eb1..44ed9824 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/processors/BackgroundSubtractor.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/processors/BackgroundSubtractor.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video.processors; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/processors/Blur.java b/app/src/main/java/com/davidmiguel/gobees/video/processors/Blur.java index af19570d..d452287c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/processors/Blur.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/processors/Blur.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video.processors; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/processors/ContoursFinder.java b/app/src/main/java/com/davidmiguel/gobees/video/processors/ContoursFinder.java index c5b4970e..494dbf22 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/processors/ContoursFinder.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/processors/ContoursFinder.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video.processors; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/processors/Morphology.java b/app/src/main/java/com/davidmiguel/gobees/video/processors/Morphology.java index 99b187e9..e004d64d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/processors/Morphology.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/processors/Morphology.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video.processors; import android.support.annotation.NonNull; diff --git a/app/src/main/java/com/davidmiguel/gobees/video/processors/VideoProcessor.java b/app/src/main/java/com/davidmiguel/gobees/video/processors/VideoProcessor.java index b3dc22f4..e7a03b45 100644 --- a/app/src/main/java/com/davidmiguel/gobees/video/processors/VideoProcessor.java +++ b/app/src/main/java/com/davidmiguel/gobees/video/processors/VideoProcessor.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees.video.processors; import org.opencv.core.Mat; diff --git a/app/src/main/res/layout/addeditapiary_act.xml b/app/src/main/res/layout/addeditapiary_act.xml index d6d5feff..174ba498 100644 --- a/app/src/main/res/layout/addeditapiary_act.xml +++ b/app/src/main/res/layout/addeditapiary_act.xml @@ -1,5 +1,23 @@ + + + + diff --git a/app/src/main/res/layout/addedithive_act.xml b/app/src/main/res/layout/addedithive_act.xml index a8af73db..84bae4ff 100644 --- a/app/src/main/res/layout/addedithive_act.xml +++ b/app/src/main/res/layout/addedithive_act.xml @@ -1,5 +1,23 @@ + + + + diff --git a/app/src/main/res/layout/apiaries_act.xml b/app/src/main/res/layout/apiaries_act.xml index e126795f..788e0c30 100644 --- a/app/src/main/res/layout/apiaries_act.xml +++ b/app/src/main/res/layout/apiaries_act.xml @@ -1,5 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + . + --> + + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index dcc319db..ecf932d4 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,4 +1,22 @@ + + #FFC107 diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 1eb32b1c..0efc7f62 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,3 +1,21 @@ + + 16dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9d7ce2f9..6e30043d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,4 +1,22 @@ + + diff --git a/app/src/main/res/xml/general_settings.xml b/app/src/main/res/xml/general_settings.xml index 2a4ee9ef..8d496529 100644 --- a/app/src/main/res/xml/general_settings.xml +++ b/app/src/main/res/xml/general_settings.xml @@ -1,4 +1,22 @@ + + + + diff --git a/app/src/mock/java/com/davidmiguel/gobees/Injection.java b/app/src/mock/java/com/davidmiguel/gobees/Injection.java index 70edd504..52c3c600 100644 --- a/app/src/mock/java/com/davidmiguel/gobees/Injection.java +++ b/app/src/mock/java/com/davidmiguel/gobees/Injection.java @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + package com.davidmiguel.gobees; import com.davidmiguel.gobees.data.source.cache.GoBeesRepository; diff --git a/app/src/test/java/com/davidmiguel/gobees/TestUtils.java b/app/src/test/java/com/davidmiguel/gobees/TestUtils.java index 52c941dd..cdf70e00 100644 --- a/app/src/test/java/com/davidmiguel/gobees/TestUtils.java +++ b/app/src/test/java/com/davidmiguel/gobees/TestUtils.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees; import org.opencv.core.Core; diff --git a/app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java index 00c8f593..a0d0fec4 100644 --- a/app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.addeditapiary; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/test/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenterTest.java index 1c718ff7..e028cd8f 100644 --- a/app/src/test/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.addedithive; import com.davidmiguel.gobees.data.model.Hive; diff --git a/app/src/test/java/com/davidmiguel/gobees/apiaries/ApiariesPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/apiaries/ApiariesPresenterTest.java index 93096faa..33312906 100644 --- a/app/src/test/java/com/davidmiguel/gobees/apiaries/ApiariesPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/apiaries/ApiariesPresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.apiaries; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java index 9dfd0627..accee68e 100644 --- a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.apiary; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/test/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepositoryTest.java b/app/src/test/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepositoryTest.java index 9623838b..05e92c70 100644 --- a/app/src/test/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepositoryTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepositoryTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.data.source.cache; import com.davidmiguel.gobees.data.model.Apiary; diff --git a/app/src/test/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtilsTest.java b/app/src/test/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtilsTest.java index c5d82c39..c28a9a27 100644 --- a/app/src/test/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtilsTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/data/source/network/OpenWeatherMapUtilsTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.data.source.network; import com.davidmiguel.gobees.data.model.MeteoRecord; diff --git a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java index 58d14f57..f15abe39 100644 --- a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.hive; import com.davidmiguel.gobees.data.model.Hive; diff --git a/app/src/test/java/com/davidmiguel/gobees/recording/RecordingPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/recording/RecordingPresenterTest.java index 8ce4d753..e7ba307d 100644 --- a/app/src/test/java/com/davidmiguel/gobees/recording/RecordingPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/recording/RecordingPresenterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.recording; import com.davidmiguel.gobees.data.model.Recording; diff --git a/app/src/test/java/com/davidmiguel/gobees/utils/DateTimeUtilsTest.java b/app/src/test/java/com/davidmiguel/gobees/utils/DateTimeUtilsTest.java index 0b9efc41..20d837a7 100644 --- a/app/src/test/java/com/davidmiguel/gobees/utils/DateTimeUtilsTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/utils/DateTimeUtilsTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.utils; import org.junit.Before; diff --git a/app/src/test/java/com/davidmiguel/gobees/utils/HourAxisValueFormatterTest.java b/app/src/test/java/com/davidmiguel/gobees/utils/HourAxisValueFormatterTest.java index 09644974..acda56c7 100644 --- a/app/src/test/java/com/davidmiguel/gobees/utils/HourAxisValueFormatterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/utils/HourAxisValueFormatterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.utils; import org.junit.Test; diff --git a/app/src/test/java/com/davidmiguel/gobees/utils/StringUtilsTest.java b/app/src/test/java/com/davidmiguel/gobees/utils/StringUtilsTest.java index 0bd600e8..893b4cb9 100644 --- a/app/src/test/java/com/davidmiguel/gobees/utils/StringUtilsTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/utils/StringUtilsTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.utils; import org.junit.Test; diff --git a/app/src/test/java/com/davidmiguel/gobees/video/ContourBeesCounterTest.java b/app/src/test/java/com/davidmiguel/gobees/video/ContourBeesCounterTest.java index 8013a199..09ffbab3 100644 --- a/app/src/test/java/com/davidmiguel/gobees/video/ContourBeesCounterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/video/ContourBeesCounterTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.video; import android.annotation.SuppressLint; diff --git a/app/src/test/java/com/davidmiguel/gobees/video/OpenCvBaseTest.java b/app/src/test/java/com/davidmiguel/gobees/video/OpenCvBaseTest.java index da9aedaa..0c89ad73 100644 --- a/app/src/test/java/com/davidmiguel/gobees/video/OpenCvBaseTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/video/OpenCvBaseTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.video; import org.opencv.core.Core; diff --git a/app/src/test/java/com/davidmiguel/gobees/video/processors/ProcessorsTest.java b/app/src/test/java/com/davidmiguel/gobees/video/processors/ProcessorsTest.java index b771565f..75d3f0bf 100644 --- a/app/src/test/java/com/davidmiguel/gobees/video/processors/ProcessorsTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/video/processors/ProcessorsTest.java @@ -1,3 +1,20 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + package com.davidmiguel.gobees.video.processors; import com.davidmiguel.gobees.video.OpenCvBaseTest; diff --git a/build.gradle b/build.gradle index b87f9163..2d36dda4 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,21 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { diff --git a/docs/img/licenses_compatibility.docx b/docs/img/licenses_compatibility.docx new file mode 100644 index 0000000000000000000000000000000000000000..0d9cd99a948b38737e829b9079b5e0a51c0e7332 GIT binary patch literal 24531 zcmeFY)0d|~kS1Id$ z=elGi=G#6^*gw;{SHhn!hHkF`CGktDX^Z#)`GfH9nldmhmFP_Vv_`g9ZdK} z$IV%oP5w%Y$rl!n`sXL25ycj)AP-KRXO1s$^(3S8w3h@Cn`+Lt;l_skyi%;&01`_2 z!OuW8iF9r^ztwS)Soer#OQP#L1`yEC4=9lQ{}18#@z||5|I}9YAAn*1AzatN*vgTf z?mzbbhwT50;rzc{y(*#4Vt@fo;3n`ZaIRZny$`ccmfmo719J@$N>lPT%Eqe2%J&z~ z>MDr#nZEeM{6gZahhvtQ^KO#%Eq01Bd_*_&@|(_p=0}$sP;zirF{9hE-9B9A@w3U- zIEf_HcwnSDTEq-CMEq-5+SFf^BWjW7qf%INVyc-%L(;~=9DC)Jmoy*dymZE;WeW*S zPsj>h(Vh^zj%h3(7!&^bRA$<^*#7MX?LnpU#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y>)c(+2;?aW;nry_ zu?#-VP9i-Uyy%l3a-`Wc_ikjeoA%%fx(S}Zz7c(Vt?gayYj+~UWz-m_^4%@E^N~-s zyxf>u3Nu$Pw+Oi%ClP&m0R^i`iOpN&SEJUPW^tkuKYbi9DfM1yV`wqoX)%Z zZ6S9GF88wq@pg;YW1+D04+|aSyCpR-g+-ZMXH(bx%ao_}`5vK8#*XPY*KptKyv1%* z!@4M8rzqB4KbW2rWhdne8oogvK7M~Sf$;lE0Yzj?)rGrduvJ%wvV&~RwQ1uY_)8XV z0pLq;Peb$6OLZg1w$ww5>2c^vqVEm!yT@ON_B7d&2zY9{iF6~Y3ZeIG;rq{Iow8XR zVy2U&euI&p)5Ka5rBNEFY~A7AR7Lz0qop8f4>&M1!9bw0dVK7b2Pf6AdXzw=6MdL% z)RRk(V?L{~9&9O{);guXLKjo2sj9}_ZR4@3%T%++e+jBLKOFV={=3w`m@-dE-!((+ z`xbnsY~kngnzmCK0tZYz4U9**!brm(Kh*}jIy^F&ZVQ!Nbvc~^%35zlR}&S@&-_J( zu#+8FLtQVFr!+r=AbeJAcC_G;G^=H)d0YzGsP(}t6pAh9@6JyqyWy02l6$MX|J;RL@=iYSIv6q;HjnZG4P#l(b$18og5aFJIld1LJ%wx;tFuW0m>ozZ&J3H} zv{d2hhFFS}Gg2lP-OWfqExI>UJ}}4E5;az@q!nc38q}HNLklx?8~6qrPbc1notmGR z6bp?VS=5B!liSl7fz7y^oCgevMJL8hS($@`(`riQk#|x&{n-}_WYJJ_SgJo!IN7hC)Q literal 0 HcmV?d00001 From d0e38dd0691c14e0d7cc75e1d4308342f6c49db0 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sat, 7 Jan 2017 01:40:46 +0100 Subject: [PATCH 02/14] Document viabilidad legal #145 --- README.md | 14 ++ docs/latex/bibliografia.bib | 2 +- docs/latex/bibliografiaAnexos.bib | 15 ++ docs/rst/anexos/A_PlanProyecto.rst | 219 +++++++++++++++++++++++++++++ 4 files changed, 249 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ac21ef0..ac549eb7 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,17 @@ [![Code Climate](https://codeclimate.com/github/davidmigloz/go-bees/badges/gpa.svg)](https://codeclimate.com/github/davidmigloz/go-bees) [![Dependency Status](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33) [![Documentation Status](https://readthedocs.org/projects/go-bees/badge/?version=develop)](http://go-bees.readthedocs.io/es/develop/?badge=develop) + +## License + +Copyright (c) 2016 - 2017 David Miguel Lozano + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. \ No newline at end of file diff --git a/docs/latex/bibliografia.bib b/docs/latex/bibliografia.bib index e85aa629..22faaac3 100644 --- a/docs/latex/bibliografia.bib +++ b/docs/latex/bibliografia.bib @@ -333,4 +333,4 @@ @misc{ opencv:contours year = "2016", url = {http://docs.opencv.org/3.0-beta/doc/py_tutorials/py_imgproc/py_contours/py_table_of_contents_contours/py_table_of_contents_contours.html}, note = "[Online; Accedido 19-Octubre-2016]" -} \ No newline at end of file +} diff --git a/docs/latex/bibliografiaAnexos.bib b/docs/latex/bibliografiaAnexos.bib index e69de29b..933e820d 100644 --- a/docs/latex/bibliografiaAnexos.bib +++ b/docs/latex/bibliografiaAnexos.bib @@ -0,0 +1,15 @@ +@misc{ wiki:licencia, + author = "Wikipedia", + title = "Licencia --- Wikipedia{,} The Free Encyclopedia", + year = "2016", + url = {https://es.wikipedia.org/w/index.php?title=Licencia&oldid=94243114}, + note = "[Online; Accedido 07-Enero-2017]" +} + +@misc{ license:gplv3, + author = "Free Software Foundation", + title = "GNU General Public License v3.0", + year = "2007", + url = {https://www.gnu.org/licenses/gpl-3.0.txt}, + note = "[Online; Accedido 07-Enero-2017]" +} \ No newline at end of file diff --git a/docs/rst/anexos/A_PlanProyecto.rst b/docs/rst/anexos/A_PlanProyecto.rst index f51718d9..85aa46c5 100644 --- a/docs/rst/anexos/A_PlanProyecto.rst +++ b/docs/rst/anexos/A_PlanProyecto.rst @@ -365,3 +365,222 @@ Viabilidad económica Viabilidad legal ---------------- + +En esta sección se discutirán los temas relacionados con las licencias. +Tanto del propio *software*, como de su documentación, imágenes y +vídeos. + +"En Derecho, una licencia es un contrato mediante el cual una persona +recibe de otra el derecho de uso, de copia, de distribución, de estudio +y de modificación (en el caso del *Software* Libre) de varios de sus +bienes, normalmente de carácter no tangible o intelectual, pudiendo +darse a cambio del pago de un monto determinado por el uso de los +mismos." [wiki:licencia]_ + +Software +======== + +En primer lugar, vamos a analizar cuál sería la licencia más conveniente +para nuestro proyecto. Por un lado, somos nosotros los que podemos +elegir qué derechos queremos proporcionar a los usuarios y cuáles no. +Sin embargo, estamos limitados por los derechos que nos conceden a +nosotros las licencias de las dependencias utilizadas en el proyecto. + +A continuación, se muestran las licencias de las dependencias usadas. + ++----------------+---------+----------------------------------------------+----------+ +| Dependencia | Versión | Descripción | Licencia | ++================+=========+==============================================+==========+ +| Android | 25.1.0 | Biblioteca de compatibilidad de Android. | Apache | +| Support | | | v2.0 | +| Library | | | | ++----------------+---------+----------------------------------------------+----------+ +| OpenCV | 3.1.0 | Biblioteca de visión artificial. | BSD | ++----------------+---------+----------------------------------------------+----------+ +| Google Play | 10.0.1 | Biblioteca que proporciona acceso a | Apache | +| Services | | diferentes servicios, entre ellos, | v2.0 | +| | | localización. | | ++----------------+---------+----------------------------------------------+----------+ +| Guava | 20.0 | Conjunto de bibliotecas comunes para Java. | Apache | +| | | | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| RoundedImageVi | 2.3.0 | Componente para mostrar imágenes redondeadas | Apache | +| ew | | en Android. | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| MPAndroidChart | 3.0.1 | Biblioteca de gráficos para Android. | Apache | +| | | | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| VNTNumberPicker| 1.0.0 | Componente para seleccionar valores | Apache | +| Preference | | numéricos. | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| Permission | 1.0.6 | Biblioteca que facilita la gestión de | MIT | +| Utils | | permisos en tiempo de ejecución. | | ++----------------+---------+----------------------------------------------+----------+ +| JUnit | 4.12 | Framework para *testing* unitario en Java. | EPL | ++----------------+---------+----------------------------------------------+----------+ +| Mockito | 2.0.2 | Framework para *mocking* en Java. | MIT | ++----------------+---------+----------------------------------------------+----------+ +| SLF4J | 1.7.21 | API para *logging* en Java. | MIT | +| | | | | ++----------------+---------+----------------------------------------------+----------+ +| Apache Log4j | 1.7.21 | Biblioteca para *logging* en Java. | Apache | +| | | | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| Android JSON | 20160810| Biblioteca para trabajar con JSON. | Apache | +| | | | v2.0 | ++----------------+---------+----------------------------------------------+----------+ +| Espresso | 2.2.2 | Framework de *testing* para Android. | Apache | +| | | | v2.0 | ++----------------+---------+----------------------------------------------+----------+ + +Por lo tanto, podemos licenciar nuestro proyecto bajo una licencia que +sea compatible con Apache v2.0, BSD, MIT y EPL. En el siguiente gráfico +mostramos la compatibilidad entre estas licencias, así como su grado de +permisividad. + +.. figure:: https://cloud.githubusercontent.com/assets/6546265/21730744/6bc30c16-d451-11e6-9c6a-dfae7ba3348d.png + :alt: licenses\_compatibility + +Podemos observar que la licencia más restrictiva (en el sentido de +obligaciones a cumplir) es la *Eclipse Public License* que posee la +librería JUnit. + +La forma de monetización del proyecto se realizará mediante +suscripciones a una plataforma *cloud* que permitirá la sincronización +entre varios dispositivos, entre otras cosas. Por lo tanto, la +liberación del código del proyecto no pone en peligro su monetización, +sino todo lo contrario, abre la puerta a que la comunidad *Open Source* +aporte valor adicional a nuestro proyecto. El permitir la distribución +de la app libremente y de forma gratuita también nos es beneficioso, ya +que aumenta las posibilidades de recibir nuevas suscripciones de +usuarios. Y por último, no nos importaría que otras empresas se basaran +en nuestro código fuente para desarrollar sus productos, siempre los +liberaran bajo una licencia de código abierto para que nosotros también +pudiéramos aprovechar las mejoras que hubieran realizado. + +Teniendo en cuenta todo lo anterior, la licencia que más se ajusta a +nuestras pretensiones es la *GNU General Public License v3.0*, que, de +forma resumida, establece lo siguiente: [license:gplv3]_ + ++--------------------+------------------------------------------+----------------------------------+ +| Derechos | Condiciones | Limitaciones | ++====================+==========================================+==================================+ +| Uso comercial. | Liberar código fuente. | Limitación de responsabilidad. | ++--------------------+------------------------------------------+----------------------------------+ +| Distribución. | Nota sobre la licencia y copyright. | Sin garantías. | ++--------------------+------------------------------------------+----------------------------------+ +| Modificación. | Modificaciones bajo la misma licencia. | | ++--------------------+------------------------------------------+----------------------------------+ +| Uso de patentes. | Indicar modificaciones realizadas. | | ++--------------------+------------------------------------------+----------------------------------+ +| Uso privado. | | | ++--------------------+------------------------------------------+----------------------------------+ + +https://www.gnu.org/licenses/gpl-3.0.txt + +Sin embargo, GPL v3.0 no es compatible con la licencia EPL que posee +JUnit. Ya que, la EPL requiere que "cualquier distribución del trabajo +conceda a todos los destinatarios una licencia para las patentes que +pudieran tener que cubrir las modificaciones que han hecho" [license:epl]_. Esto supone +que los destinatarios pueden añadir una restricción adicional, hecho que +prohíbe rotundamente GPL: "[que el distribuidor] no imponga ninguna +restricción más sobre el ejercicio de los derechos concedidos a los +beneficiarios" [license:gplv3]. + +Tras analizar otras licencias alternativas, no se ha encontrado ninguna +compatible con EPL y, a la vez, con nuestras pretensiones. Por lo que +finalmente se ha tomado la decisión de utilizar dos licencias para el +código fuente del proyecto. Por un lado, todo el código fuente de la +aplicación se ha licenciado bajo GPL v3.0. Mientras que el código fuente +de testeo, que hace uso de código licenciado bajo EPL (JUnit), se ha +liberado bajo licencia Apache v2.0, la cual sí que es compatible con +EPL. + +Documentación +============= + +Aunque se puede utilizar también la licencia GPL v3.0 para licenciar la +documentación, no es lo más recomendable. Ya que contiene numerosas +cláusulas que solo tienen sentido cuando se habla de código fuente. Por +ejemplo, si alguien quisiese distribuir una copia de la documentación de +forma impresa, estaría obligado a proporcionar también una copia del +código fuente. + +Por lo que se ha decido utilizar una licencia *Creative Commons*, las +cuales están más enfocadas a licenciar este tipo de material. En +concreto, se ha elegido la *Creative Commons Attribution 4.0 +International* (CC-BY-4.0). Que establece lo siguiente: [license:ccby4]_ + ++--------------+---------------------------+-------------------------------------+ +| Derechos | Condiciones | Limitaciones | ++==============+===========================+=====================================+ +| Uso | Nota sobre la licencia y | Limitación de responsabilidad. | +| comercial. | copyright. | | ++--------------+---------------------------+-------------------------------------+ +| Distribución.| Indicar modificaciones | Sin garantías. | +| | realizadas. | | ++--------------+---------------------------+-------------------------------------+ +| Modificación.| | No proporciona derechos sobre | +| | | marcas registradas. | ++--------------+---------------------------+-------------------------------------+ +| Uso privado. | | No proporciona derechos sobre | +| | | patentes. | ++--------------+---------------------------+-------------------------------------+ + +Imágenes y vídeos +================= + +En la documentación no se ha utilizado ninguna imagen de terceros, todas +las imágenes son propias del proyecto y cuentan con la misma licencia +que la documentación (CC-BY-4.0). + +El *dataset* de vídeos de prueba también se encuentra bajo la misma +licencia. + +Por otro lado, en la aplicación se han utilizado dos fuentes de +imágenes: + ++-------------------------+-----------------------------------------+---------------+ +| Fuente | Descripción | Licencia | ++=========================+=========================================+===============+ +| Material design icons | Conjunto de iconos oficial de Google. | Apache v2.0 | ++-------------------------+-----------------------------------------+---------------+ +| Simple Weather Icons | Conjunto de iconos meteorológicos. | Apache v2.0 | ++-------------------------+-----------------------------------------+---------------+ + +Aunque ambos autores renuncian a la obligación de especificar +explícitamente su autoría, se les ha mencionado en la sección "Licencias +de software libre" de la aplicación. + +El resto de imágenes y gráficos utilizados son de autoría propia y se +distribuyen también bajo CC-BY-4.0.3. + +Resumen +======= + +En la siguiente tabla se resumen las licencias que posee el proyecto. + ++-----------------------+---------------+ +| Recurso | Licencia | ++=======================+===============+ +| Código fuente app | GPLv3 | ++-----------------------+---------------+ +| Código fuente tests | Apache v2.0 | ++-----------------------+---------------+ +| Documentación | CC-BY-4.0 | ++-----------------------+---------------+ +| Imágenes | CC-BY-4.0 | ++-----------------------+---------------+ +| Vídeos | CC-BY-4.0 | ++-----------------------+---------------+ + +.. References + +.. [wiki:licencia] + https://es.wikipedia.org/w/index.php?title=Licencia&oldid=94243114 +.. [license:gplv3] + https://www.gnu.org/licenses/gpl-3.0.txt +.. [license:epl] + https://www.eclipse.org/legal/epl-v10.html +.. [license:ccby4] + https://creativecommons.org/licenses/by/4.0 From 500c8d7d0f3dd5e07ea7f50cf69eb436b6edffcb Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sat, 7 Jan 2017 01:50:41 +0100 Subject: [PATCH 03/14] Minor changes #145 --- docs/rst/anexos/A_PlanProyecto.rst | 6 ++---- docs/rst/conf.py | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/rst/anexos/A_PlanProyecto.rst b/docs/rst/anexos/A_PlanProyecto.rst index 85aa46c5..f244ed79 100644 --- a/docs/rst/anexos/A_PlanProyecto.rst +++ b/docs/rst/anexos/A_PlanProyecto.rst @@ -476,8 +476,6 @@ forma resumida, establece lo siguiente: [license:gplv3]_ | Uso privado. | | | +--------------------+------------------------------------------+----------------------------------+ -https://www.gnu.org/licenses/gpl-3.0.txt - Sin embargo, GPL v3.0 no es compatible con la licencia EPL que posee JUnit. Ya que, la EPL requiere que "cualquier distribución del trabajo conceda a todos los destinatarios una licencia para las patentes que @@ -485,7 +483,7 @@ pudieran tener que cubrir las modificaciones que han hecho" [license:epl]_. Esto que los destinatarios pueden añadir una restricción adicional, hecho que prohíbe rotundamente GPL: "[que el distribuidor] no imponga ninguna restricción más sobre el ejercicio de los derechos concedidos a los -beneficiarios" [license:gplv3]. +beneficiarios" [license:gplv3]_. Tras analizar otras licencias alternativas, no se ha encontrado ninguna compatible con EPL y, a la vez, con nuestras pretensiones. Por lo que @@ -538,7 +536,7 @@ El *dataset* de vídeos de prueba también se encuentra bajo la misma licencia. Por otro lado, en la aplicación se han utilizado dos fuentes de -imágenes: +imágenes de terceros: +-------------------------+-----------------------------------------+---------------+ | Fuente | Descripción | Licencia | diff --git a/docs/rst/conf.py b/docs/rst/conf.py index bae38cfa..6caa87b4 100644 --- a/docs/rst/conf.py +++ b/docs/rst/conf.py @@ -45,7 +45,7 @@ # General information about the project. project = u'GoBees' -copyright = u'2016, David Miguel Lozano' +copyright = u'2016, David Miguel Lozano (CC BY 4.0)' author = u'David Miguel Lozano' # The version info for the project you're documenting, acts as replacement for From 38706cc1970c35a90a48d5f4d7abb993ab69a741 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sun, 8 Jan 2017 13:25:14 +0100 Subject: [PATCH 04/14] Implement hive last revision #142 --- .../addedithive/AddEditHivePresenter.java | 6 +++++- .../gobees/apiary/HivesAdapter.java | 6 ++++++ .../davidmiguel/gobees/data/model/Hive.java | 19 ++++++++++++++++++- .../gobees/data/model/mothers/HiveMother.java | 4 +++- .../source/local/GoBeesLocalDataSource.java | 2 ++ docs/latex/bibliografiaAnexos.bib | 16 ++++++++++++++++ 6 files changed, 50 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java index b404a988..1b00a8f4 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java @@ -24,6 +24,8 @@ import com.davidmiguel.gobees.data.source.GoBeesDataSource.GetNextHiveIdCallback; import com.davidmiguel.gobees.data.source.cache.GoBeesRepository; +import java.util.Date; + /** * Listens to user actions from the UI AddEditHiveFragment, retrieves the data and updates the * UI as required. @@ -144,7 +146,7 @@ private void updateHive(String name, String notes) { } /** - * aves (or update) the hive. + * Saves (or update) the hive. * * @param hiveId hive id. * @param name hive name. @@ -157,6 +159,8 @@ private void saveHive(long hiveId, String name, String notes) { hive.setName(name); // Set notes hive.setNotes(notes); + // Set last revision (now) + hive.setLastRevision(new Date()); // Save it if it is correct if (hive.isValidHive()) { goBeesRepository.saveHive(apiaryId, hive, this); diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java b/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java index c619b0c5..f1cc78a7 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/HivesAdapter.java @@ -23,6 +23,7 @@ import android.support.annotation.NonNull; import android.support.v7.widget.CardView; import android.support.v7.widget.RecyclerView; +import android.text.format.DateUtils; import android.view.ContextMenu; import android.view.LayoutInflater; import android.view.MenuInflater; @@ -37,6 +38,7 @@ import com.davidmiguel.gobees.utils.BaseViewHolder; import com.davidmiguel.gobees.utils.ItemTouchHelperViewHolder; +import java.util.Date; import java.util.List; import static com.google.common.base.Preconditions.checkNotNull; @@ -97,6 +99,7 @@ class ViewHolder extends RecyclerView.ViewHolder private View viewHolder; private CardView card; private TextView hiveName; + private TextView lastRevision; private ImageView moreIcon; private Drawable background; @@ -108,6 +111,7 @@ class ViewHolder extends RecyclerView.ViewHolder viewHolder = itemView; card = (CardView) itemView.findViewById(R.id.card); hiveName = (TextView) itemView.findViewById(R.id.hive_name); + lastRevision = (TextView) itemView.findViewById(R.id.last_revision); moreIcon = (ImageView) itemView.findViewById(R.id.more_icon); // Set listeners @@ -126,6 +130,8 @@ public void onClick(View view) { public void bind(@NonNull Hive hive) { hiveName.setText(hive.getName()); + lastRevision.setText(DateUtils.getRelativeTimeSpanString(hive.getLastRevision().getTime(), + (new Date()).getTime(), DateUtils.MINUTE_IN_MILLIS)); } @Override diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java b/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java index b325f82c..949e08c0 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/Hive.java @@ -24,6 +24,7 @@ import com.google.common.base.Objects; import com.google.common.base.Strings; +import java.util.Date; import java.util.List; import io.realm.RealmList; @@ -59,6 +60,13 @@ public class Hive extends RealmObject { @Nullable private String notes; + /** + * Last revision of the hive. (Last date when some event related with the hive happened + * (the hive was created, modified, a new recording was added...). + */ + @Required + private Date lastRevision; + /** * List of records of the hive. */ @@ -78,11 +86,12 @@ public Hive() { } public Hive(long id, String name, @Nullable String imageUrl, - @Nullable String notes, @Nullable RealmList records) { + @Nullable String notes, Date lastRevision, @Nullable RealmList records) { this.id = id; this.name = name; this.imageUrl = imageUrl; this.notes = notes; + this.lastRevision = lastRevision; this.records = records; } @@ -120,6 +129,14 @@ public void setNotes(@Nullable String notes) { this.notes = notes; } + public Date getLastRevision() { + return lastRevision; + } + + public void setLastRevision(Date lastRevision) { + this.lastRevision = lastRevision; + } + @Nullable public RealmList getRecords() { return records; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java index 29cf0489..6128dc59 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/HiveMother.java @@ -21,6 +21,7 @@ import com.davidmiguel.gobees.data.model.Hive; import com.davidmiguel.gobees.data.model.Record; +import java.util.Date; import java.util.Random; import io.realm.RealmList; @@ -57,6 +58,7 @@ private static HiveMother newHive() { /** * Generate a hive. + * * @return hive. */ public static Hive newDefaultHive() { @@ -74,6 +76,6 @@ private HiveMother withNotes(String notes) { } private Hive build() { - return new Hive(id, name, imageUrl, notes, records); + return new Hive(id, name, imageUrl, notes, new Date(), records); } } \ No newline at end of file diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java index d70085e1..17e559e1 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java @@ -347,6 +347,8 @@ public void execute(Realm realm) { // Add to hive Hive hive = realm.where(Hive.class).equalTo("id", hiveId).findFirst(); hive.addRecords(records); + // Update last revision date (now) + hive.setLastRevision(new Date()); } }); callback.onSuccess(); diff --git a/docs/latex/bibliografiaAnexos.bib b/docs/latex/bibliografiaAnexos.bib index 933e820d..7a1ec71f 100644 --- a/docs/latex/bibliografiaAnexos.bib +++ b/docs/latex/bibliografiaAnexos.bib @@ -12,4 +12,20 @@ @misc{ license:gplv3 year = "2007", url = {https://www.gnu.org/licenses/gpl-3.0.txt}, note = "[Online; Accedido 07-Enero-2017]" +} + +@misc{ license:epl, + author = "Eclipse Foundation", + title = "Eclipse Public License (EPL)", + year = "2004", + url = {https://www.eclipse.org/legal/epl-v10.html}, + note = "[Online; Accedido 07-Enero-2017]" +} + +@misc{ license:ccby4, + author = "Creative Commons", + title = "Attribution 4.0 International (CC BY 4.0)", + year = "2016", + url = {https://creativecommons.org/licenses/by/4.0/}, + note = "[Online; Accedido 07-Enero-2017]" } \ No newline at end of file From 0a9d843ed9e083ae3858b81c2f9e890798599b95 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sun, 8 Jan 2017 13:53:48 +0100 Subject: [PATCH 05/14] Minor changes --- .../addeditapiary/AddEditApiaryContract.java | 5 +++ .../addeditapiary/AddEditApiaryFragment.java | 6 +++ .../addeditapiary/AddEditApiaryPresenter.java | 4 ++ .../addedithive/AddEditHiveContract.java | 5 +++ .../addedithive/AddEditHiveFragment.java | 7 +++ .../addedithive/AddEditHivePresenter.java | 4 ++ .../gobees/utils/AndroidUtils.java | 44 +++++++++++++++++++ docs/rst/anexos/A_PlanProyecto.rst | 4 +- 8 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 app/src/main/java/com/davidmiguel/gobees/utils/AndroidUtils.java diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java index 379dc201..0c3dfe10 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryContract.java @@ -90,6 +90,11 @@ interface View extends BaseView { * @return if the permission is granted. */ boolean checkLocationPermission(); + + /** + * Closes / hides soft Android keyboard. + */ + void closeKeyboard(); } interface Presenter extends BasePresenter { diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java index aded7055..7e09bcd6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryFragment.java @@ -37,6 +37,7 @@ import android.widget.Toast; import com.davidmiguel.gobees.R; +import com.davidmiguel.gobees.utils.AndroidUtils; import rebus.permissionutils.AskagainCallback; import rebus.permissionutils.PermissionEnum; @@ -226,6 +227,11 @@ public void result(boolean allPermissionsGranted) { return false; } + @Override + public void closeKeyboard() { + AndroidUtils.closeKeyboard(getActivity()); + } + @Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { diff --git a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java index 854598df..ef843280 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryPresenter.java @@ -143,12 +143,16 @@ public void onDataNotAvailable() { @Override public void onSuccess() { + // Close keyboard + view.closeKeyboard(); // Apiary saved successfully -> go back to apiaries activity view.showApiariesList(); } @Override public void onFailure() { + // Close keyboard + view.closeKeyboard(); // Error saving apiaries view.showSaveApiaryError(); } diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java index a4aa0110..ff58f194 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveContract.java @@ -56,6 +56,11 @@ interface View extends BaseView { * @param notes hive notes. */ void setNotes(String notes); + + /** + * Closes / hides soft Android keyboard. + */ + void closeKeyboard(); } interface Presenter extends BasePresenter { diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java index 5306cf2f..b3723303 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHiveFragment.java @@ -28,9 +28,11 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.view.inputmethod.InputMethodManager; import android.widget.TextView; import com.davidmiguel.gobees.R; +import com.davidmiguel.gobees.utils.AndroidUtils; import static com.google.common.base.Preconditions.checkNotNull; @@ -117,6 +119,11 @@ public void setNotes(String notes) { notesTextView.setText(notes); } + @Override + public void closeKeyboard() { + AndroidUtils.closeKeyboard(getActivity()); + } + @Override public void setPresenter(@NonNull AddEditHiveContract.Presenter presenter) { this.presenter = checkNotNull(presenter); diff --git a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java index 1b00a8f4..dd2b9b24 100644 --- a/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/addedithive/AddEditHivePresenter.java @@ -97,12 +97,16 @@ public void onDataNotAvailable() { @Override public void onSuccess() { + // Close keyboard + view.closeKeyboard(); // Apiary saved successfully -> go back to apiaries activity view.showHivesList(); } @Override public void onFailure() { + // Close keyboard + view.closeKeyboard(); // Error saving apiaries view.showSaveHiveError(); } diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/AndroidUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/AndroidUtils.java new file mode 100644 index 00000000..03275683 --- /dev/null +++ b/app/src/main/java/com/davidmiguel/gobees/utils/AndroidUtils.java @@ -0,0 +1,44 @@ +/* + * GoBees + * Copyright (c) 2016 - 2017 David Miguel Lozano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.davidmiguel.gobees.utils; + +import android.app.Activity; +import android.content.Context; +import android.view.View; +import android.view.inputmethod.InputMethodManager; + +/** + * Android related utilities. + */ +public class AndroidUtils { + + /** + * Closes / hides soft Android keyboard. + * + * @param activity current activity. + */ + public static void closeKeyboard(Activity activity) { + View view = activity.getCurrentFocus(); + if (view != null) { + InputMethodManager imm = + (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); + imm.hideSoftInputFromWindow(view.getWindowToken(), 0); + } + } +} diff --git a/docs/rst/anexos/A_PlanProyecto.rst b/docs/rst/anexos/A_PlanProyecto.rst index f244ed79..3e003609 100644 --- a/docs/rst/anexos/A_PlanProyecto.rst +++ b/docs/rst/anexos/A_PlanProyecto.rst @@ -433,7 +433,7 @@ A continuación, se muestran las licencias de las dependencias usadas. | | | | v2.0 | +----------------+---------+----------------------------------------------+----------+ -Por lo tanto, podemos licenciar nuestro proyecto bajo una licencia que +Por lo tanto, tenemos que escoger una licencia para nuestro proyecto que sea compatible con Apache v2.0, BSD, MIT y EPL. En el siguiente gráfico mostramos la compatibilidad entre estas licencias, así como su grado de permisividad. @@ -447,7 +447,7 @@ librería JUnit. La forma de monetización del proyecto se realizará mediante suscripciones a una plataforma *cloud* que permitirá la sincronización -entre varios dispositivos, entre otras cosas. Por lo tanto, la +entre varios dispositivos, entre otras funcionalidades. Por lo tanto, la liberación del código del proyecto no pone en peligro su monetización, sino todo lo contrario, abre la puerta a que la comunidad *Open Source* aporte valor adicional a nuestro proyecto. El permitir la distribución From 948dc9d915233383876a0f020f5031c5e1be4248 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Sun, 8 Jan 2017 16:08:01 +0100 Subject: [PATCH 06/14] Minor fixes #145 --- docs/rst/anexos/A_PlanProyecto.rst | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/rst/anexos/A_PlanProyecto.rst b/docs/rst/anexos/A_PlanProyecto.rst index 3e003609..6edf9a4b 100644 --- a/docs/rst/anexos/A_PlanProyecto.rst +++ b/docs/rst/anexos/A_PlanProyecto.rst @@ -361,10 +361,12 @@ Estudio de viabilidad --------------------- Viabilidad económica --------------------- +~~~~~~~~~~~~~~~~~~~~ + +TODO Viabilidad legal ----------------- +~~~~~~~~~~~~~~~~ En esta sección se discutirán los temas relacionados con las licencias. Tanto del propio *software*, como de su documentación, imágenes y @@ -378,7 +380,7 @@ darse a cambio del pago de un monto determinado por el uso de los mismos." [wiki:licencia]_ Software -======== +^^^^^^^^ En primer lugar, vamos a analizar cuál sería la licencia más conveniente para nuestro proyecto. Por un lado, somos nosotros los que podemos @@ -495,7 +497,7 @@ liberado bajo licencia Apache v2.0, la cual sí que es compatible con EPL. Documentación -============= +^^^^^^^^^^^^^ Aunque se puede utilizar también la licencia GPL v3.0 para licenciar la documentación, no es lo más recomendable. Ya que contiene numerosas @@ -526,7 +528,7 @@ International* (CC-BY-4.0). Que establece lo siguiente: [license:ccby4]_ +--------------+---------------------------+-------------------------------------+ Imágenes y vídeos -================= +^^^^^^^^^^^^^^^^^ En la documentación no se ha utilizado ninguna imagen de terceros, todas las imágenes son propias del proyecto y cuentan con la misma licencia @@ -554,7 +556,7 @@ El resto de imágenes y gráficos utilizados son de autoría propia y se distribuyen también bajo CC-BY-4.0.3. Resumen -======= +^^^^^^^ En la siguiente tabla se resumen las licencias que posee el proyecto. From f403cb820a6d0d88dbb738df2822d0b067cda9b2 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Mon, 9 Jan 2017 14:46:47 +0100 Subject: [PATCH 07/14] Add hive info #144 --- .../davidmiguel/gobees/hive/HiveActivity.java | 4 +- .../davidmiguel/gobees/hive/HiveContract.java | 24 +++- .../gobees/hive/HiveInfoFragment.java | 99 +++++++++++++- .../gobees/hive/HivePresenter.java | 78 ++++++----- .../gobees/hive/HiveRecordingsFragment.java | 18 ++- app/src/main/res/drawable-anydpi/ic_edit.xml | 9 ++ app/src/main/res/drawable-anydpi/ic_notes.xml | 9 ++ app/src/main/res/layout/hive_info_frag.xml | 121 +++++++++++++++++- app/src/main/res/values/strings.xml | 13 +- .../gobees/hive/HivePresenterTest.java | 20 +-- 10 files changed, 330 insertions(+), 65 deletions(-) create mode 100644 app/src/main/res/drawable-anydpi/ic_edit.xml create mode 100644 app/src/main/res/drawable-anydpi/ic_notes.xml diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java index 0eed8a97..ee9f416d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveActivity.java @@ -94,8 +94,8 @@ protected void onCreate(Bundle savedInstanceState) { goBeesRepository.openDb(); // Create the presenter - new HivePresenter(goBeesRepository, (HiveContract.View) hiveRecordingsFragment, - apiaryId, hiveId); + new HivePresenter(goBeesRepository, (HiveContract.HiveRecordingsView) + hiveRecordingsFragment, hiveInfoFragment, apiaryId, hiveId); } @Override diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java index 7f6ceb11..27337072 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java @@ -21,6 +21,7 @@ import android.content.Intent; import android.support.annotation.NonNull; +import com.davidmiguel.gobees.data.model.Hive; import com.davidmiguel.gobees.data.model.Recording; import com.davidmiguel.gobees.utils.BasePresenter; import com.davidmiguel.gobees.utils.BaseView; @@ -33,7 +34,7 @@ */ interface HiveContract { - interface View extends BaseView { + interface HiveRecordingsView extends BaseView { /** * Displays or hide loading indicator. @@ -116,6 +117,23 @@ interface View extends BaseView { boolean checkCameraPermission(); } + interface HiveInfoView extends BaseView { + + /** + * Displays or hide loading indicator. + * + * @param active true or false. + */ + void setLoadingIndicator(final boolean active); + + /** + * Shows the hive info. + * + * @param hive hive to show. + */ + void showInfo(Hive hive); + } + interface Presenter extends BasePresenter { /** @@ -128,11 +146,11 @@ interface Presenter extends BasePresenter { void result(int requestCode, int resultCode, Intent data); /** - * Load recordings from repository. + * Load hive and its recordings from repository. * * @param forceUpdate force cache update. */ - void loadRecordings(boolean forceUpdate); + void loadData(boolean forceUpdate); /** * Orders to open activity to record a hive. diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java index f10573e4..e948768f 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java @@ -19,20 +19,38 @@ package com.davidmiguel.gobees.hive; import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; +import android.support.v4.content.ContextCompat; +import android.support.v4.widget.SwipeRefreshLayout; +import android.support.v7.widget.CardView; +import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.LinearLayout; import android.widget.TextView; import com.davidmiguel.gobees.R; +import com.davidmiguel.gobees.data.model.Hive; import com.davidmiguel.gobees.utils.BaseTabFragment; +import com.davidmiguel.gobees.utils.ScrollChildSwipeRefreshLayout; +import com.google.common.base.Strings; + +import java.util.Date; + +import static com.google.common.base.Preconditions.checkNotNull; /** * Displays hive info. - * // TODO */ -public class HiveInfoFragment extends Fragment implements BaseTabFragment { +public class HiveInfoFragment extends Fragment implements BaseTabFragment, HiveContract.HiveInfoView { + + private HiveContract.Presenter presenter; + private FloatingActionButton fab; + private TextView lastRevision; + private TextView notes; public static HiveInfoFragment newInstance() { return new HiveInfoFragment(); @@ -46,14 +64,83 @@ public void onCreate(Bundle savedInstanceState) { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.apiary_info_frag, container, false); - TextView textView = (TextView) view; - textView.setText("Fragment #INFO"); - return view; + View root = inflater.inflate(R.layout.hive_info_frag, container, false); + + // Set up view + LinearLayout info = (LinearLayout) root.findViewById(R.id.info); + lastRevision = (TextView) root.findViewById(R.id.last_revision); + notes = (TextView) root.findViewById(R.id.notes_content); + + // Set up floating action button + fab = (FloatingActionButton) getActivity().findViewById(R.id.fab_new_recording); + + // Set up progress indicator + final ScrollChildSwipeRefreshLayout swipeRefreshLayout = + (ScrollChildSwipeRefreshLayout) root.findViewById(R.id.refresh_layout); + swipeRefreshLayout.setColorSchemeColors( + ContextCompat.getColor(getActivity(), R.color.colorPrimary), + ContextCompat.getColor(getActivity(), R.color.colorAccent), + ContextCompat.getColor(getActivity(), R.color.colorPrimaryDark) + ); + + // Set the scrolling view in the custom SwipeRefreshLayout + swipeRefreshLayout.setScrollUpChild(info); + swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { + @Override + public void onRefresh() { + presenter.loadData(false); + } + }); + return root; + } + + @Override + public void setUserVisibleHint(boolean isVisibleToUser) { + super.setUserVisibleHint(isVisibleToUser); + if (isVisibleToUser && isResumed()) { + fab.setVisibility(View.GONE); + } } @Override public int getTabName() { return R.string.hive_info_tab; } + + @Override + public void setLoadingIndicator(final boolean active) { + if (getView() == null) { + return; + } + final SwipeRefreshLayout srl = + (SwipeRefreshLayout) getView().findViewById(R.id.refresh_layout); + // Make sure setRefreshing() is called after the layout is done with everything else + srl.post(new Runnable() { + @Override + public void run() { + srl.setRefreshing(active); + } + }); + } + + @Override + public void showInfo(Hive hive) { + lastRevision.setText(DateUtils.getRelativeTimeSpanString(hive.getLastRevision().getTime(), + (new Date()).getTime(), DateUtils.MINUTE_IN_MILLIS)); + if (Strings.isNullOrEmpty(hive.getNotes())) { + notes.setText(getString(R.string.no_notes)); + } else { + notes.setText(hive.getNotes()); + } + } + + @Override + public void setPresenter(@NonNull HiveContract.Presenter presenter) { + this.presenter = checkNotNull(presenter); + } + + @Override + public boolean isActive() { + return isAdded(); + } } diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java index 279f8f5b..88181c5d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java @@ -35,7 +35,8 @@ class HivePresenter implements HiveContract.Presenter { private GoBeesRepository goBeesRepository; - private HiveContract.View view; + private HiveContract.HiveRecordingsView hiveRecordingsView; + private HiveContract.HiveInfoView hiveInfoView; /** * Force update the first time. @@ -44,11 +45,15 @@ class HivePresenter implements HiveContract.Presenter { private long apiaryId; private long hiveId; - HivePresenter(GoBeesRepository goBeesRepository, HiveContract.View view, + HivePresenter(GoBeesRepository goBeesRepository, + HiveContract.HiveRecordingsView hiveRecordingsView, + HiveContract.HiveInfoView hiveInfoView, long apiaryId, long hiveId) { this.goBeesRepository = goBeesRepository; - this.view = view; - this.view.setPresenter(this); + this.hiveRecordingsView = hiveRecordingsView; + this.hiveRecordingsView.setPresenter(this); + this.hiveInfoView = hiveInfoView; + this.hiveInfoView.setPresenter(this); this.apiaryId = apiaryId; this.hiveId = hiveId; } @@ -59,34 +64,34 @@ public void result(int requestCode, int resultCode, Intent data) { if (MonitoringActivity.REQUEST_MONITORING == requestCode) { if (resultCode == Activity.RESULT_OK) { // Refresh recordings - loadRecordings(true); + loadData(true); // Show message - view.showSuccessfullySavedMessage(); + hiveRecordingsView.showSuccessfullySavedMessage(); } else if (resultCode == Activity.RESULT_CANCELED && data != null) { // Get error type int error = data.getIntExtra(HiveRecordingsFragment.ARGUMENT_MONITORING_ERROR, -1); // Show error message switch (error) { case HiveRecordingsFragment.ERROR_RECORDING_TOO_SHORT: - view.showRecordingTooShortErrorMessage(); + hiveRecordingsView.showRecordingTooShortErrorMessage(); break; case HiveRecordingsFragment.ERROR_SAVING_RECORDING: - view.showSaveErrorMessage(); + hiveRecordingsView.showSaveErrorMessage(); break; default: - view.showSaveErrorMessage(); + hiveRecordingsView.showSaveErrorMessage(); } } } } @Override - public void loadRecordings(boolean forceUpdate) { + public void loadData(boolean forceUpdate) { // Force update the first time forceUpdate = forceUpdate || firstLoad; firstLoad = false; // Show progress indicator - view.setLoadingIndicator(true); + hiveRecordingsView.setLoadingIndicator(true); // Refresh data if needed if (forceUpdate) { goBeesRepository.refreshRecordings(hiveId); @@ -96,84 +101,89 @@ public void loadRecordings(boolean forceUpdate) { @Override public void onHiveLoaded(Hive hive) { - // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + // The hiveRecordingsView may not be able to handle UI updates anymore + if (!hiveRecordingsView.isActive() || !hiveInfoView.isActive()) { return; } // Hide progress indicator - view.setLoadingIndicator(false); + hiveRecordingsView.setLoadingIndicator(false); + hiveInfoView.setLoadingIndicator(false); // Set hive name as title - view.showTitle(hive.getName()); + hiveRecordingsView.showTitle(hive.getName()); // Process recordings if (hive.getRecordings().isEmpty()) { // Show a message indicating there are no recordings - view.showNoRecordings(); + hiveRecordingsView.showNoRecordings(); } else { // Show the list of recordings - view.showRecordings(hive.getRecordings()); + hiveRecordingsView.showRecordings(hive.getRecordings()); } + // Show hive info + hiveInfoView.showInfo(hive); + hive.getRecords(); } @Override public void onDataNotAvailable() { - // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + // The hiveRecordingsView may not be able to handle UI updates anymore + if (!hiveRecordingsView.isActive() || !hiveInfoView.isActive()) { return; } // Hide progress indicator - view.setLoadingIndicator(false); + hiveRecordingsView.setLoadingIndicator(false); + hiveInfoView.setLoadingIndicator(false); // Show error - view.showLoadingRecordingsError(); + hiveRecordingsView.showLoadingRecordingsError(); } }); } @Override public void startNewRecording() { - if (view.checkCameraPermission()) { - view.startNewRecording(apiaryId, hiveId); + if (hiveRecordingsView.checkCameraPermission()) { + hiveRecordingsView.startNewRecording(apiaryId, hiveId); } } @Override public void openRecordingsDetail(@NonNull Recording recording) { - view.showRecordingDetail(apiaryId, hiveId, recording.getDate()); + hiveRecordingsView.showRecordingDetail(apiaryId, hiveId, recording.getDate()); } @Override public void deleteRecording(@NonNull Recording recording) { // Show progress indicator - view.setLoadingIndicator(true); + hiveRecordingsView.setLoadingIndicator(true); // Delete recording goBeesRepository.deleteRecording(hiveId, recording, new GoBeesDataSource.TaskCallback() { @Override public void onSuccess() { - // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + // The hiveRecordingsView may not be able to handle UI updates anymore + if (!hiveRecordingsView.isActive()) { return; } // Refresh recordings - loadRecordings(true); + loadData(true); // Show success message - view.showSuccessfullyDeletedMessage(); + hiveRecordingsView.showSuccessfullyDeletedMessage(); } @Override public void onFailure() { - // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + // The hiveRecordingsView may not be able to handle UI updates anymore + if (!hiveRecordingsView.isActive()) { return; } // Hide progress indicator - view.setLoadingIndicator(false); + hiveRecordingsView.setLoadingIndicator(false); // Show error - view.showDeletedErrorMessage(); + hiveRecordingsView.showDeletedErrorMessage(); } }); } @Override public void start() { - loadRecordings(false); + loadData(false); } } diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java index c3f40c65..847b5b5b 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveRecordingsFragment.java @@ -67,7 +67,7 @@ * Dispaly a list of recordings. */ public class HiveRecordingsFragment extends Fragment - implements BaseTabFragment, HiveContract.View, RecordingsAdapter.RecordingItemListener { + implements BaseTabFragment, HiveContract.HiveRecordingsView, RecordingsAdapter.RecordingItemListener { public static final String ARGUMENT_APIARY_ID = "APIARY_ID"; public static final String ARGUMENT_HIVE_ID = "HIVE_ID"; @@ -79,6 +79,7 @@ public class HiveRecordingsFragment extends Fragment private RecordingsAdapter listAdapter; private View noRecordingsView; private LinearLayout hivesView; + private FloatingActionButton fab; public HiveRecordingsFragment() { // Requires empty public constructor @@ -112,8 +113,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, noRecordingsView = root.findViewById(R.id.no_recordings); // Set up floating action button - FloatingActionButton fab = - (FloatingActionButton) getActivity().findViewById(R.id.fab_new_recording); + fab = (FloatingActionButton) getActivity().findViewById(R.id.fab_new_recording); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -135,7 +135,7 @@ public void onClick(View v) { swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { - presenter.loadRecordings(false); + presenter.loadData(false); } }); @@ -151,6 +151,14 @@ public void onResume() { presenter.start(); } + @Override + public void setUserVisibleHint(boolean isVisibleToUser) { + super.setUserVisibleHint(isVisibleToUser); + if (isVisibleToUser && isResumed()) { + fab.setVisibility(View.VISIBLE); + } + } + @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.hive_frag_menu, menu); @@ -163,7 +171,7 @@ public boolean onOptionsItemSelected(MenuItem item) { NavUtils.navigateUpFromSameTask(getActivity()); return true; case R.id.menu_refresh: - presenter.loadRecordings(true); + presenter.loadData(true); break; } return true; diff --git a/app/src/main/res/drawable-anydpi/ic_edit.xml b/app/src/main/res/drawable-anydpi/ic_edit.xml new file mode 100644 index 00000000..43489826 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_edit.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-anydpi/ic_notes.xml b/app/src/main/res/drawable-anydpi/ic_notes.xml new file mode 100644 index 00000000..f12fd414 --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_notes.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/hive_info_frag.xml b/app/src/main/res/layout/hive_info_frag.xml index fdd42ae4..54799c8b 100644 --- a/app/src/main/res/layout/hive_info_frag.xml +++ b/app/src/main/res/layout/hive_info_frag.xml @@ -18,9 +18,120 @@ ~ along with this program. If not, see . --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6e30043d..3f78943e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -146,7 +146,7 @@ My hive - 10 days ago + 0 days ago Error while loading hives. @@ -157,8 +157,10 @@ Hive deleted! Error while deleting hive. - + Last revision icon + + Last revision icon Hive logo @@ -210,6 +212,13 @@ Without this permission the app is unable to monitor the flight activity of your hive. Are you sure you want to deny this permission? + + Notes… + + No notes. + + General info + diff --git a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java index f15abe39..d5a4bd44 100644 --- a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java @@ -51,7 +51,10 @@ public class HivePresenterTest { private GoBeesRepository goBeesRepository; @Mock - private HiveContract.View hiveView; + private HiveContract.HiveRecordingsView hiveHiveRecordingsView; + + @Mock + private HiveContract.HiveInfoView hiveInfoView; private HivePresenter hivePresenter; @@ -71,10 +74,11 @@ public void setupHivesPresenter() { RecordingMother.newDefaultRecording())); // Get a reference to the class under test - hivePresenter = new HivePresenter(goBeesRepository, hiveView, 0,HIVE.getId()); + hivePresenter = new HivePresenter(goBeesRepository, + hiveHiveRecordingsView, hiveInfoView, 0, HIVE.getId()); // The presenter won't update the view unless it's active - when(hiveView.isActive()).thenReturn(true); + when(hiveHiveRecordingsView.isActive()).thenReturn(true); } @SuppressWarnings("unchecked") @@ -82,19 +86,19 @@ public void setupHivesPresenter() { public void loadRecordings_showRecordingsIntoView() { // Given an initialized HivePresenter // When loading of recordings is requested - hivePresenter.loadRecordings(true); + hivePresenter.loadData(true); // Callback is captured and invoked with stubbed hives verify(goBeesRepository).getHiveWithRecordings(anyLong(), getHiveCallbackArgumentCaptor.capture()); getHiveCallbackArgumentCaptor.getValue().onHiveLoaded(HIVE); // Then progress indicator is shown - InOrder inOrder = inOrder(hiveView); - inOrder.verify(hiveView).setLoadingIndicator(true); + InOrder inOrder = inOrder(hiveHiveRecordingsView); + inOrder.verify(hiveHiveRecordingsView).setLoadingIndicator(true); // Then progress indicator is hidden and all hives are shown in UI - inOrder.verify(hiveView).setLoadingIndicator(false); + inOrder.verify(hiveHiveRecordingsView).setLoadingIndicator(false); ArgumentCaptor showRecordingsArgumentCaptor = ArgumentCaptor.forClass(List.class); - verify(hiveView).showRecordings(showRecordingsArgumentCaptor.capture()); + verify(hiveHiveRecordingsView).showRecordings(showRecordingsArgumentCaptor.capture()); // Assert that the number of hives shown is the expected assertTrue(showRecordingsArgumentCaptor.getValue().size() == HIVE.getRecordings().size()); } From a48d6a73ff3a4fb7821e6eaaf88734ef76bfa793 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Tue, 10 Jan 2017 14:15:05 +0100 Subject: [PATCH 08/14] Fix test #144 --- .../davidmiguel/gobees/hive/HivePresenter.java | 2 +- .../gobees/hive/HivePresenterTest.java | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java index 88181c5d..2e72c6b0 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java @@ -102,7 +102,7 @@ public void loadData(boolean forceUpdate) { @Override public void onHiveLoaded(Hive hive) { // The hiveRecordingsView may not be able to handle UI updates anymore - if (!hiveRecordingsView.isActive() || !hiveInfoView.isActive()) { + if (!hiveRecordingsView.isActive() && !hiveInfoView.isActive()) { return; } // Hide progress indicator diff --git a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java index d5a4bd44..bf898b7e 100644 --- a/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/hive/HivePresenterTest.java @@ -51,7 +51,7 @@ public class HivePresenterTest { private GoBeesRepository goBeesRepository; @Mock - private HiveContract.HiveRecordingsView hiveHiveRecordingsView; + private HiveContract.HiveRecordingsView hiveRecordingsView; @Mock private HiveContract.HiveInfoView hiveInfoView; @@ -75,10 +75,10 @@ public void setupHivesPresenter() { // Get a reference to the class under test hivePresenter = new HivePresenter(goBeesRepository, - hiveHiveRecordingsView, hiveInfoView, 0, HIVE.getId()); + hiveRecordingsView, hiveInfoView, 0, HIVE.getId()); // The presenter won't update the view unless it's active - when(hiveHiveRecordingsView.isActive()).thenReturn(true); + when(hiveRecordingsView.isActive()).thenReturn(true); } @SuppressWarnings("unchecked") @@ -93,12 +93,13 @@ public void loadRecordings_showRecordingsIntoView() { getHiveCallbackArgumentCaptor.getValue().onHiveLoaded(HIVE); // Then progress indicator is shown - InOrder inOrder = inOrder(hiveHiveRecordingsView); - inOrder.verify(hiveHiveRecordingsView).setLoadingIndicator(true); + InOrder inOrder = inOrder(hiveRecordingsView); + inOrder.verify(hiveRecordingsView).setLoadingIndicator(true); // Then progress indicator is hidden and all hives are shown in UI - inOrder.verify(hiveHiveRecordingsView).setLoadingIndicator(false); + inOrder.verify(hiveRecordingsView).isActive(); + inOrder.verify(hiveRecordingsView).setLoadingIndicator(false); ArgumentCaptor showRecordingsArgumentCaptor = ArgumentCaptor.forClass(List.class); - verify(hiveHiveRecordingsView).showRecordings(showRecordingsArgumentCaptor.capture()); + verify(hiveRecordingsView).showRecordings(showRecordingsArgumentCaptor.capture()); // Assert that the number of hives shown is the expected assertTrue(showRecordingsArgumentCaptor.getValue().size() == HIVE.getRecordings().size()); } From 190751d536c9507a1b931c7dcd1529230d18acd8 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Tue, 10 Jan 2017 16:11:51 +0100 Subject: [PATCH 09/14] Add apiary general info #143 --- .../gobees/apiary/ApiaryActivity.java | 2 +- .../gobees/apiary/ApiaryContract.java | 26 ++- .../gobees/apiary/ApiaryHivesFragment.java | 18 +- .../gobees/apiary/ApiaryInfoFragment.java | 113 +++++++++- .../gobees/apiary/ApiaryPresenter.java | 73 ++++--- .../gobees/data/source/GoBeesDataSource.java | 8 + .../data/source/cache/GoBeesRepository.java | 8 +- .../source/local/GoBeesLocalDataSource.java | 9 + .../davidmiguel/gobees/hive/HiveContract.java | 2 +- .../gobees/hive/HiveInfoFragment.java | 5 +- .../gobees/hive/HivePresenter.java | 1 - ...ic_my_location.xml => ic_get_location.xml} | 0 .../main/res/drawable-anydpi/ic_location.xml | 9 + .../main/res/layout/addeditapiary_frag.xml | 2 +- app/src/main/res/layout/apiary_info_frag.xml | 201 +++++++++++++++++- app/src/main/res/values/strings.xml | 20 +- .../gobees/apiary/ApiaryPresenterTest.java | 16 +- 17 files changed, 451 insertions(+), 62 deletions(-) rename app/src/main/res/drawable-anydpi/{ic_my_location.xml => ic_get_location.xml} (100%) create mode 100644 app/src/main/res/drawable-anydpi/ic_location.xml diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java index 161a6b1a..9bd95bc9 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryActivity.java @@ -83,7 +83,7 @@ protected void onCreate(Bundle savedInstanceState) { goBeesRepository.openDb(); // Create the presenter - new ApiaryPresenter(goBeesRepository, apiaryHivesFragment, apiaryId); + new ApiaryPresenter(goBeesRepository, apiaryHivesFragment, apiaryInfoFragment, apiaryId); } @Override diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java index d1cf6766..ce398bd6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java @@ -20,10 +20,12 @@ import android.support.annotation.NonNull; +import com.davidmiguel.gobees.data.model.Apiary; import com.davidmiguel.gobees.data.model.Hive; import com.davidmiguel.gobees.utils.BasePresenter; import com.davidmiguel.gobees.utils.BaseView; +import java.util.Date; import java.util.List; /** @@ -31,7 +33,7 @@ */ interface ApiaryContract { - interface View extends BaseView { + interface ApiaryHivesView extends BaseView { /** * Displays or hide loading indicator. @@ -96,6 +98,24 @@ interface View extends BaseView { void showTitle(@NonNull String title); } + interface ApiaryInfoView extends BaseView { + + /** + * Displays or hide loading indicator. + * + * @param active true or false. + */ + void setLoadingIndicator(final boolean active); + + /** + * Shows the hive info. + * + * @param apiary apiary to show. + * @param lastRevisionDate apiary last revision. + */ + void showInfo(Apiary apiary, Date lastRevisionDate); + } + interface Presenter extends BasePresenter { /** @@ -107,11 +127,11 @@ interface Presenter extends BasePresenter { void result(int requestCode, int resultCode); /** - * Load hives from repository. + * Load apiary info and its hives from repository. * * @param forceUpdate force cache update. */ - void loadHives(boolean forceUpdate); + void loadData(boolean forceUpdate); /** * Orders to open activity to add or edit a hive. diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java index 1e6c2d83..c3af4e99 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryHivesFragment.java @@ -57,7 +57,7 @@ * Display a list of hives. */ public class ApiaryHivesFragment extends Fragment - implements BaseTabFragment, ApiaryContract.View, HivesAdapter.HiveItemListener { + implements BaseTabFragment, ApiaryContract.ApiaryHivesView, HivesAdapter.HiveItemListener { public static final String ARGUMENT_APIARY_ID = "APIARY_ID"; @@ -65,6 +65,7 @@ public class ApiaryHivesFragment extends Fragment private HivesAdapter listAdapter; private View noHivesView; private LinearLayout hivesView; + private FloatingActionButton fab; /** * Get ApiaryHivesFragment instance. @@ -103,8 +104,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, noHivesView = root.findViewById(R.id.no_hives); // Set up floating action button - FloatingActionButton fab = - (FloatingActionButton) getActivity().findViewById(R.id.fab_add_hive); + fab = (FloatingActionButton) getActivity().findViewById(R.id.fab_add_hive); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { @@ -126,7 +126,7 @@ public void onClick(View view) { swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { - presenter.loadHives(false); + presenter.loadData(false); } }); @@ -142,6 +142,14 @@ public void onResume() { presenter.start(); } + @Override + public void setUserVisibleHint(boolean isVisibleToUser) { + super.setUserVisibleHint(isVisibleToUser); + if (isVisibleToUser && isResumed()) { + fab.setVisibility(View.VISIBLE); + } + } + @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { inflater.inflate(R.menu.apiary_frag_menu, menu); @@ -154,7 +162,7 @@ public boolean onOptionsItemSelected(MenuItem item) { NavUtils.navigateUpFromSameTask(getActivity()); return true; case R.id.menu_refresh: - presenter.loadHives(true); + presenter.loadData(true); break; } return true; diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java index d98c045b..c14d8222 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java @@ -19,20 +19,41 @@ package com.davidmiguel.gobees.apiary; import android.os.Bundle; +import android.support.annotation.NonNull; +import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; +import android.support.v4.content.ContextCompat; +import android.support.v4.widget.SwipeRefreshLayout; +import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; +import android.widget.LinearLayout; import android.widget.TextView; import com.davidmiguel.gobees.R; +import com.davidmiguel.gobees.data.model.Apiary; import com.davidmiguel.gobees.utils.BaseTabFragment; +import com.davidmiguel.gobees.utils.ScrollChildSwipeRefreshLayout; +import com.google.common.base.Strings; + +import java.util.Date; + +import static com.google.common.base.Preconditions.checkNotNull; /** * Display apiary info. * TODO */ -public class ApiaryInfoFragment extends Fragment implements BaseTabFragment { +public class ApiaryInfoFragment extends Fragment + implements BaseTabFragment, ApiaryContract.ApiaryInfoView { + + private ApiaryContract.Presenter presenter; + private FloatingActionButton fab; + private TextView location; + private TextView numHives; + private TextView lastRevision; + private TextView notes; public static ApiaryInfoFragment newInstance() { return new ApiaryInfoFragment(); @@ -46,14 +67,96 @@ public void onCreate(Bundle savedInstanceState) { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View view = inflater.inflate(R.layout.apiary_info_frag, container, false); - TextView textView = (TextView) view; - textView.setText("Fragment #INFO"); - return view; + View root = inflater.inflate(R.layout.apiary_info_frag, container, false); + + // Set up view + LinearLayout info = (LinearLayout) root.findViewById(R.id.info); + location = (TextView) root.findViewById(R.id.location); + numHives = (TextView) root.findViewById(R.id.num_hives); + lastRevision = (TextView) root.findViewById(R.id.last_revision); + notes = (TextView) root.findViewById(R.id.notes_content); + + // Set up floating action button + fab = (FloatingActionButton) getActivity().findViewById(R.id.fab_add_hive); + + // Set up progress indicator + final ScrollChildSwipeRefreshLayout swipeRefreshLayout = + (ScrollChildSwipeRefreshLayout) root.findViewById(R.id.refresh_layout); + swipeRefreshLayout.setColorSchemeColors( + ContextCompat.getColor(getActivity(), R.color.colorPrimary), + ContextCompat.getColor(getActivity(), R.color.colorAccent), + ContextCompat.getColor(getActivity(), R.color.colorPrimaryDark) + ); + + // Set the scrolling view in the custom SwipeRefreshLayout + swipeRefreshLayout.setScrollUpChild(info); + swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { + @Override + public void onRefresh() { + presenter.loadData(false); + } + }); + return root; + } + + @Override + public void setUserVisibleHint(boolean isVisibleToUser) { + super.setUserVisibleHint(isVisibleToUser); + if (isVisibleToUser && isResumed()) { + fab.setVisibility(View.GONE); + } } @Override public int getTabName() { return R.string.apiary_info_tab; } + + @Override + public void setLoadingIndicator(final boolean active) { + if (getView() == null) { + return; + } + final SwipeRefreshLayout srl = + (SwipeRefreshLayout) getView().findViewById(R.id.refresh_layout); + // Make sure setRefreshing() is called after the layout is done with everything else + srl.post(new Runnable() { + @Override + public void run() { + srl.setRefreshing(active); + } + }); + } + + @SuppressWarnings("ConstantConditions") + @Override + public void showInfo(Apiary apiary, Date lastRevisionDate) { + // Location + String latLetter = (apiary.getLocationLat() > 0) ? "N" : "S"; + String lonLetter = (apiary.getLocationLong() > 0) ? "E" : "W"; + location.setText(apiary.getLocationLat() + latLetter + ", " + + apiary.getLocationLong() + lonLetter); + // Num hives + int num = apiary.getHives().size(); + numHives.setText(getResources().getQuantityString(R.plurals.num_hives_plurals, num, num)); + // Last revision + lastRevision.setText(DateUtils.getRelativeTimeSpanString(lastRevisionDate.getTime(), + (new Date()).getTime(), DateUtils.MINUTE_IN_MILLIS)); + // Notes + if (Strings.isNullOrEmpty(apiary.getNotes())) { + notes.setText(getString(R.string.no_notes)); + } else { + notes.setText(apiary.getNotes()); + } + } + + @Override + public void setPresenter(@NonNull ApiaryContract.Presenter presenter) { + this.presenter = checkNotNull(presenter); + } + + @Override + public boolean isActive() { + return isAdded(); + } } diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java index 9f6449f6..b9571ca6 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java @@ -27,6 +27,8 @@ import com.davidmiguel.gobees.data.source.GoBeesDataSource; import com.davidmiguel.gobees.data.source.cache.GoBeesRepository; +import java.util.Date; + /** * Listens to user actions from the UI ApiaryHivesFragment, retrieves the data and updates the * UI as required. @@ -34,7 +36,8 @@ class ApiaryPresenter implements ApiaryContract.Presenter { private GoBeesRepository goBeesRepository; - private ApiaryContract.View view; + private ApiaryContract.ApiaryHivesView apiaryHivesView; + private ApiaryContract.ApiaryInfoView apiaryInfoView; /** * Force update the first time. @@ -42,11 +45,14 @@ class ApiaryPresenter implements ApiaryContract.Presenter { private boolean firstLoad = true; private long apiaryId; - ApiaryPresenter(GoBeesRepository goBeesRepository, ApiaryContract.View view, - long apiaryId) { + ApiaryPresenter(GoBeesRepository goBeesRepository, + ApiaryContract.ApiaryHivesView apiaryHivesView, + ApiaryContract.ApiaryInfoView apiaryInfoView, long apiaryId) { this.goBeesRepository = goBeesRepository; - this.view = view; - this.view.setPresenter(this); + this.apiaryHivesView = apiaryHivesView; + this.apiaryHivesView.setPresenter(this); + this.apiaryInfoView = apiaryInfoView; + apiaryInfoView.setPresenter(this); this.apiaryId = apiaryId; } @@ -54,18 +60,17 @@ class ApiaryPresenter implements ApiaryContract.Presenter { public void result(int requestCode, int resultCode) { // If a hive was successfully added, show snackbar if (AddEditApiaryActivity.REQUEST_ADD_APIARY == requestCode && Activity.RESULT_OK == resultCode) { - view.showSuccessfullySavedMessage(); + apiaryHivesView.showSuccessfullySavedMessage(); } - // TODO show error message if it fails } @Override - public void loadHives(boolean forceUpdate) { + public void loadData(boolean forceUpdate) { // Force update the first time forceUpdate = forceUpdate || firstLoad; firstLoad = false; // Show progress indicator - view.setLoadingIndicator(true); + apiaryHivesView.setLoadingIndicator(true); // Refresh data if needed if (forceUpdate) { goBeesRepository.refreshHives(apiaryId); @@ -75,78 +80,94 @@ public void loadHives(boolean forceUpdate) { @Override public void onApiaryLoaded(Apiary apiary) { // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + if (!apiaryHivesView.isActive() && !apiaryInfoView.isActive()) { return; } // Hide progress indicator - view.setLoadingIndicator(false); + apiaryHivesView.setLoadingIndicator(false); + apiaryInfoView.setLoadingIndicator(false); // Set apiary name as title - view.showTitle(apiary.getName()); + apiaryHivesView.showTitle(apiary.getName()); // Process hives if (apiary.getHives() == null || apiary.getHives().isEmpty()) { // Show a message indicating there are no hives - view.showNoHives(); + apiaryHivesView.showNoHives(); } else { // Show the list of hives - view.showHives(apiary.getHives()); + apiaryHivesView.showHives(apiary.getHives()); } + // Show apiary info + apiaryInfoView.showInfo(apiary, getApiaryLastRevision()); } @Override public void onDataNotAvailable() { // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + if (!apiaryHivesView.isActive() && !apiaryInfoView.isActive()) { return; } - view.showLoadingHivesError(); + // Hide progress indicator + apiaryHivesView.setLoadingIndicator(false); + apiaryInfoView.setLoadingIndicator(false); + // Show error + apiaryHivesView.showLoadingHivesError(); } }); } @Override public void addEditHive(long hiveId) { - view.showAddEditHive(apiaryId, hiveId); + apiaryHivesView.showAddEditHive(apiaryId, hiveId); } @Override public void openHiveDetail(@NonNull Hive requestedHive) { - view.showHiveDetail(apiaryId, requestedHive.getId()); + apiaryHivesView.showHiveDetail(apiaryId, requestedHive.getId()); } @Override public void deleteHive(@NonNull Hive hive) { // Show progress indicator - view.setLoadingIndicator(true); + apiaryHivesView.setLoadingIndicator(true); // Delete hive goBeesRepository.deleteHive(hive.getId(), new GoBeesDataSource.TaskCallback() { @Override public void onSuccess() { // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + if (!apiaryHivesView.isActive()) { return; } // Refresh recordings - loadHives(true); + loadData(true); // Show success message - view.showSuccessfullyDeletedMessage(); + apiaryHivesView.showSuccessfullyDeletedMessage(); } @Override public void onFailure() { // The view may not be able to handle UI updates anymore - if (!view.isActive()) { + if (!apiaryHivesView.isActive()) { return; } // Hide progress indicator - view.setLoadingIndicator(false); + apiaryHivesView.setLoadingIndicator(false); // Show error - view.showDeletedErrorMessage(); + apiaryHivesView.showDeletedErrorMessage(); } }); } @Override public void start() { - loadHives(false); + loadData(false); + } + + /** + * Gets apiary last revision. + * + * @return last revision date. + */ + private Date getApiaryLastRevision() { + return goBeesRepository.getApiaryLastRevision(apiaryId); } } diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java index f2b56635..e929014c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/GoBeesDataSource.java @@ -108,6 +108,14 @@ public interface GoBeesDataSource { */ void getNextApiaryId(@NonNull GetNextApiaryIdCallback callback); + /** + * Gets the last date when apiary info was updated. + * + * @param apiaryId apiary id. + * @return apiary last revision date. + */ + Date getApiaryLastRevision(long apiaryId); + /** * Gets all hives. * Note: don't modify the Hive objects. diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java b/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java index c6eedad2..3eefb1fd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/cache/GoBeesRepository.java @@ -80,8 +80,9 @@ private GoBeesRepository(GoBeesDataSource goBeesDataSource, /** * Get GoBeesRepository instance. + * * @param apiariesLocalDataSource local data source. - * @param weatherDataSource weather data source. + * @param weatherDataSource weather data source. * @return GoBeesRepository instace. */ public static GoBeesRepository getInstance(GoBeesDataSource apiariesLocalDataSource, @@ -202,6 +203,11 @@ public void getNextApiaryId(@NonNull GetNextApiaryIdCallback callback) { goBeesDataSource.getNextApiaryId(callback); } + @Override + public Date getApiaryLastRevision(long apiaryId) { + return goBeesDataSource.getApiaryLastRevision(apiaryId); + } + @SuppressWarnings("ConstantConditions") @Override public void getHives(long apiaryId, @NonNull GetHivesCallback callback) { diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java index 17e559e1..b3b5b925 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/local/GoBeesLocalDataSource.java @@ -178,6 +178,15 @@ public void getNextApiaryId(@NonNull GetNextApiaryIdCallback callback) { callback.onNextApiaryIdLoaded(nextId != null ? nextId.longValue() + 1 : 0); } + @Override + public Date getApiaryLastRevision(long apiaryId) { + // Get apiary + Apiary apiary = realm.where(Apiary.class).equalTo("id", apiaryId).findFirst(); + // Get last revision date from all hives + return apiary.getHives() == null + ? null : apiary.getHives().where().maximumDate("lastRevision"); + } + @SuppressWarnings("ConstantConditions") @Override public void getHives(long apiaryId, @NonNull GetHivesCallback callback) { diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java index 27337072..22d6f35c 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveContract.java @@ -146,7 +146,7 @@ interface Presenter extends BasePresenter { void result(int requestCode, int resultCode, Intent data); /** - * Load hive and its recordings from repository. + * Load hive info and its recordings from repository. * * @param forceUpdate force cache update. */ diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java index e948768f..6f8a8852 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HiveInfoFragment.java @@ -45,7 +45,8 @@ /** * Displays hive info. */ -public class HiveInfoFragment extends Fragment implements BaseTabFragment, HiveContract.HiveInfoView { +public class HiveInfoFragment extends Fragment + implements BaseTabFragment, HiveContract.HiveInfoView { private HiveContract.Presenter presenter; private FloatingActionButton fab; @@ -125,8 +126,10 @@ public void run() { @Override public void showInfo(Hive hive) { + // Last revision lastRevision.setText(DateUtils.getRelativeTimeSpanString(hive.getLastRevision().getTime(), (new Date()).getTime(), DateUtils.MINUTE_IN_MILLIS)); + // Notes if (Strings.isNullOrEmpty(hive.getNotes())) { notes.setText(getString(R.string.no_notes)); } else { diff --git a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java index 2e72c6b0..c8d91491 100644 --- a/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/hive/HivePresenter.java @@ -120,7 +120,6 @@ public void onHiveLoaded(Hive hive) { } // Show hive info hiveInfoView.showInfo(hive); - hive.getRecords(); } @Override diff --git a/app/src/main/res/drawable-anydpi/ic_my_location.xml b/app/src/main/res/drawable-anydpi/ic_get_location.xml similarity index 100% rename from app/src/main/res/drawable-anydpi/ic_my_location.xml rename to app/src/main/res/drawable-anydpi/ic_get_location.xml diff --git a/app/src/main/res/drawable-anydpi/ic_location.xml b/app/src/main/res/drawable-anydpi/ic_location.xml new file mode 100644 index 00000000..3da94f6c --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_location.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/addeditapiary_frag.xml b/app/src/main/res/layout/addeditapiary_frag.xml index e2bc3b0b..b1518a65 100644 --- a/app/src/main/res/layout/addeditapiary_frag.xml +++ b/app/src/main/res/layout/addeditapiary_frag.xml @@ -64,7 +64,7 @@ android:layout_gravity="center" android:adjustViewBounds="false" android:contentDescription="@string/gps_location_icon" - android:src="@drawable/ic_my_location" + android:src="@drawable/ic_get_location" android:tint="@color/colorAccent"/> diff --git a/app/src/main/res/layout/apiary_info_frag.xml b/app/src/main/res/layout/apiary_info_frag.xml index 7c42efb0..8cf2f55d 100644 --- a/app/src/main/res/layout/apiary_info_frag.xml +++ b/app/src/main/res/layout/apiary_info_frag.xml @@ -18,9 +18,200 @@ ~ along with this program. If not, see . --> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3f78943e..38ec5090 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -70,6 +70,10 @@ Settings icon Get GPS location + + Location + + Number of hives @@ -82,8 +86,6 @@ - - Number of hives My apiary @@ -146,7 +148,7 @@ My hive - 0 days ago + \? days ago Error while loading hives. @@ -163,6 +165,16 @@ Last revision icon Hive logo + + No hives + + + No hives + 1 hive + %d hives + + + No location @@ -215,7 +227,7 @@ Notes… - No notes. + No notes General info diff --git a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java index accee68e..c53af11e 100644 --- a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java @@ -51,7 +51,7 @@ public class ApiaryPresenterTest { private GoBeesRepository goBeesRepository; @Mock - private ApiaryContract.View hivesView; + private ApiaryContract.ApiaryHivesView apiaryHivesView; private ApiaryPresenter apiaryPresenter; @@ -67,10 +67,10 @@ public void setupHivesPresenter() { MockitoAnnotations.initMocks(this); // Get a reference to the class under test - apiaryPresenter = new ApiaryPresenter(goBeesRepository, hivesView, APIARY_ID); + apiaryPresenter = new ApiaryPresenter(goBeesRepository, apiaryHivesView, APIARY_ID); // The presenter won't update the view unless it's active - when(hivesView.isActive()).thenReturn(true); + when(apiaryHivesView.isActive()).thenReturn(true); // Create 3 hives APIARY = ApiaryMother.newDefaultApiary(NUM_BEES); @@ -81,19 +81,19 @@ public void setupHivesPresenter() { public void loadHives_showHivesIntoView() { // Given an initialized ApiaryPresenter // When loading of hives of apiary 1 is requested - apiaryPresenter.loadHives(true); + apiaryPresenter.loadData(true); // Callback is captured and invoked with stubbed hives verify(goBeesRepository).getApiary(anyLong(), getApiaryCallbackArgumentCaptor.capture()); getApiaryCallbackArgumentCaptor.getValue().onApiaryLoaded(APIARY); // Then progress indicator is shown - InOrder inOrder = inOrder(hivesView); - inOrder.verify(hivesView).setLoadingIndicator(true); + InOrder inOrder = inOrder(apiaryHivesView); + inOrder.verify(apiaryHivesView).setLoadingIndicator(true); // Then progress indicator is hidden and all hives are shown in UI - inOrder.verify(hivesView).setLoadingIndicator(false); + inOrder.verify(apiaryHivesView).setLoadingIndicator(false); ArgumentCaptor showHivesArgumentCaptor = ArgumentCaptor.forClass(List.class); - verify(hivesView).showHives(showHivesArgumentCaptor.capture()); + verify(apiaryHivesView).showHives(showHivesArgumentCaptor.capture()); // Assert that the number of hives shown is the expected assertTrue(showHivesArgumentCaptor.getValue().size() == APIARY.getHives().size()); } From 3bb3d8064f448725c5a487e1a9981ff12859544a Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Wed, 11 Jan 2017 00:04:24 +0100 Subject: [PATCH 10/14] Add detailid weather data #143 --- .../gobees/apiary/ApiaryContract.java | 14 +- .../gobees/apiary/ApiaryInfoFragment.java | 109 +++- .../gobees/apiary/ApiaryPresenter.java | 8 + .../gobees/data/model/MeteoRecord.java | 2 +- .../source/preferences/GoBeesPreferences.java | 6 +- .../gobees/settings/SettingsFragment.java | 2 +- .../gobees/utils/WeatherUtils.java | 309 +++++++++- app/src/main/res/drawable-anydpi/ic_map.xml | 9 + app/src/main/res/layout/apiary_info_frag.xml | 526 +++++++++++++----- app/src/main/res/layout/hive_info_frag.xml | 4 +- app/src/main/res/values/arrays.xml | 8 +- app/src/main/res/values/strings.xml | 174 +++++- app/src/main/res/xml/general_settings.xml | 6 +- 13 files changed, 999 insertions(+), 178 deletions(-) create mode 100644 app/src/main/res/drawable-anydpi/ic_map.xml diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java index ce398bd6..a5790eae 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryContract.java @@ -110,10 +110,17 @@ interface ApiaryInfoView extends BaseView { /** * Shows the hive info. * - * @param apiary apiary to show. + * @param apiary apiary to show. * @param lastRevisionDate apiary last revision. */ void showInfo(Apiary apiary, Date lastRevisionDate); + + /** + * Shows apiary location on a map. + * + * @param apiary apiary to show. + */ + void openMap(Apiary apiary); } interface Presenter extends BasePresenter { @@ -153,5 +160,10 @@ interface Presenter extends BasePresenter { * @param hive hive to delete. */ void deleteHive(@NonNull Hive hive); + + /** + * Called when the user clicks the map icon (to show the apiary on a map). + */ + void onOpenMapClicked(); } } diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java index c14d8222..c3a62a8d 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java @@ -18,43 +18,63 @@ package com.davidmiguel.gobees.apiary; +import android.content.Intent; +import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.support.v4.content.ContextCompat; import android.support.v4.widget.SwipeRefreshLayout; +import android.support.v7.widget.CardView; import android.text.format.DateUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.LinearLayout; +import android.widget.ImageView; +import android.widget.ScrollView; import android.widget.TextView; import com.davidmiguel.gobees.R; import com.davidmiguel.gobees.data.model.Apiary; import com.davidmiguel.gobees.utils.BaseTabFragment; import com.davidmiguel.gobees.utils.ScrollChildSwipeRefreshLayout; +import com.davidmiguel.gobees.utils.WeatherUtils; import com.google.common.base.Strings; import java.util.Date; +import java.util.Locale; import static com.google.common.base.Preconditions.checkNotNull; /** * Display apiary info. - * TODO */ public class ApiaryInfoFragment extends Fragment implements BaseTabFragment, ApiaryContract.ApiaryInfoView { private ApiaryContract.Presenter presenter; private FloatingActionButton fab; + private TextView location; + private ImageView map; private TextView numHives; private TextView lastRevision; private TextView notes; + private CardView weatherCard; + private ImageView weatherIcon; + private TextView temperature; + private TextView city; + private TextView condition; + private TextView humidity; + private TextView pressure; + private TextView wind; + private TextView rain; + private TextView snow; + private TextView updated; + + public static ApiaryInfoFragment newInstance() { return new ApiaryInfoFragment(); } @@ -70,12 +90,34 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, View root = inflater.inflate(R.layout.apiary_info_frag, container, false); // Set up view - LinearLayout info = (LinearLayout) root.findViewById(R.id.info); + ScrollView info = (ScrollView) root.findViewById(R.id.info); + location = (TextView) root.findViewById(R.id.location); + map = (ImageView) root.findViewById(R.id.map_icon); numHives = (TextView) root.findViewById(R.id.num_hives); lastRevision = (TextView) root.findViewById(R.id.last_revision); notes = (TextView) root.findViewById(R.id.notes_content); + weatherCard = (CardView) root.findViewById(R.id.weather_card); + weatherIcon = (ImageView) root.findViewById(R.id.weather_icon); + temperature = (TextView) root.findViewById(R.id.temperature); + city = (TextView) root.findViewById(R.id.city); + condition = (TextView) root.findViewById(R.id.condition); + humidity = (TextView) root.findViewById(R.id.humidity); + pressure = (TextView) root.findViewById(R.id.pressure); + wind = (TextView) root.findViewById(R.id.wind); + rain = (TextView) root.findViewById(R.id.rain); + snow = (TextView) root.findViewById(R.id.snow); + updated = (TextView) root.findViewById(R.id.updated); + + // Set map intent + map.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View view) { + presenter.onOpenMapClicked(); + } + }); + // Set up floating action button fab = (FloatingActionButton) getActivity().findViewById(R.id.fab_add_hive); @@ -99,6 +141,13 @@ public void onRefresh() { return root; } + @Override + public void onResume() { + super.onResume(); + // Reset map icon color + map.setColorFilter(ContextCompat.getColor(getContext(), R.color.colorAccent)); + } + @Override public void setUserVisibleHint(boolean isVisibleToUser) { super.setUserVisibleHint(isVisibleToUser); @@ -131,10 +180,11 @@ public void run() { @SuppressWarnings("ConstantConditions") @Override public void showInfo(Apiary apiary, Date lastRevisionDate) { + // GENERAL INFO // Location String latLetter = (apiary.getLocationLat() > 0) ? "N" : "S"; String lonLetter = (apiary.getLocationLong() > 0) ? "E" : "W"; - location.setText(apiary.getLocationLat() + latLetter + ", " + location.setText(apiary.getLocationLat() + latLetter + " / " + apiary.getLocationLong() + lonLetter); // Num hives int num = apiary.getHives().size(); @@ -148,6 +198,57 @@ public void showInfo(Apiary apiary, Date lastRevisionDate) { } else { notes.setText(apiary.getNotes()); } + + // WEATHER + // Hide card if no weather data exists + if (apiary.getCurrentWeather() == null) { + weatherCard.setVisibility(View.GONE); + return; + } + // Weather Icon + String iconId = apiary.getCurrentWeather().getWeatherConditionIcon(); + weatherIcon.setImageResource(WeatherUtils.getWeatherIconResourceId(iconId)); + // Temperature + double temp = apiary.getCurrentWeather().getTemperature(); + temperature.setText(WeatherUtils.formatTemperature(getContext(), temp)); + // City + String cityName = apiary.getCurrentWeather().getCityName(); + city.setText(cityName); + // Weather condition + String weatherCondition = WeatherUtils.getStringForWeatherCondition(getContext(), + apiary.getCurrentWeather().getWeatherCondition()); + condition.setText(weatherCondition); + // Humidity + double hum = apiary.getCurrentWeather().getHumidity(); + humidity.setText(WeatherUtils.formatHumidity(getContext(), hum)); + // Pressure + double pre = apiary.getCurrentWeather().getPressure(); + pressure.setText(WeatherUtils.formatPressure(getContext(), pre)); + // Wind + double windSpeed = apiary.getCurrentWeather().getWindSpeed(); + double windDegrees = apiary.getCurrentWeather().getWindDegrees(); + wind.setText(WeatherUtils.formatWind(getContext(), windSpeed, windDegrees)); + // Rain + double rainVol = apiary.getCurrentWeather().getRain(); + rain.setText(WeatherUtils.formatRainSnow(getContext(), rainVol)); + // Snow + double snowVol = apiary.getCurrentWeather().getSnow(); + snow.setText(WeatherUtils.formatRainSnow(getContext(), snowVol)); + // Last update + String date = (String) DateUtils.getRelativeTimeSpanString(apiary.getCurrentWeather() + .getTimestamp().getTime(), (new Date()).getTime(), DateUtils.MINUTE_IN_MILLIS); + updated.setText(date); + } + + @Override + public void openMap(Apiary apiary) { + // Change icon color + map.setColorFilter(ContextCompat.getColor(getContext(), R.color.colorPrimaryDark)); + // Open map + String uri = String.format(Locale.ENGLISH, "geo:%f,%f", + apiary.getLocationLat(), apiary.getLocationLong()); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); + getContext().startActivity(intent); } @Override diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java index b9571ca6..c93b29df 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryPresenter.java @@ -44,6 +44,7 @@ class ApiaryPresenter implements ApiaryContract.Presenter { */ private boolean firstLoad = true; private long apiaryId; + private Apiary apiary; ApiaryPresenter(GoBeesRepository goBeesRepository, ApiaryContract.ApiaryHivesView apiaryHivesView, @@ -79,6 +80,8 @@ public void loadData(boolean forceUpdate) { goBeesRepository.getApiary(apiaryId, new GoBeesDataSource.GetApiaryCallback() { @Override public void onApiaryLoaded(Apiary apiary) { + // Save apiary + ApiaryPresenter.this.apiary = apiary; // The view may not be able to handle UI updates anymore if (!apiaryHivesView.isActive() && !apiaryInfoView.isActive()) { return; @@ -157,6 +160,11 @@ public void onFailure() { }); } + @Override + public void onOpenMapClicked() { + apiaryInfoView.openMap(apiary); + } + @Override public void start() { loadData(false); diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java b/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java index d12ce90e..09ae3999 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/MeteoRecord.java @@ -74,7 +74,7 @@ public class MeteoRecord extends RealmObject { private double temperatureMax; /** - * Pressure, e.g: 1023. + * Pressure in hPa, e.g: 1023. */ private int pressure; diff --git a/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java b/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java index e0279081..a7e815c0 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/source/preferences/GoBeesPreferences.java @@ -38,10 +38,10 @@ public class GoBeesPreferences { public static boolean isMetric(Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); - String keyForUnits = context.getString(R.string.pref_temp_units_key); - String defaultUnits = context.getString(R.string.pref_temp_units_metric); + String keyForUnits = context.getString(R.string.pref_weather_units_key); + String defaultUnits = context.getString(R.string.pref_weather_units_metric); String preferredUnits = sp.getString(keyForUnits, defaultUnits); - String metric = context.getString(R.string.pref_temp_units_metric); + String metric = context.getString(R.string.pref_weather_units_metric); return metric.equals(preferredUnits); } diff --git a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java index 9cff7f0d..97986dcd 100644 --- a/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/settings/SettingsFragment.java @@ -46,7 +46,7 @@ public void onCreate(Bundle savedInstanceState) { // For all preferences, attach an OnPreferenceChangeListener so the UI summary can be // updated when the preference changes - bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_temp_units_key))); + bindPreferenceSummaryToValue(findPreference(getString(R.string.pref_weather_units_key))); } /** diff --git a/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java b/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java index 27b3386c..7ccb63be 100644 --- a/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java +++ b/app/src/main/java/com/davidmiguel/gobees/utils/WeatherUtils.java @@ -61,11 +61,87 @@ public static String formatTemperature(Context context, double temperature) { return String.format(context.getString(temperatureFormatResourceId), temperature); } + /** + * Format humidity. + * + * @param context Android Context to access preferences and resources. + * @param humidity Percentage of humidity, e.g: 18. + * @return Formatted humidity String in the following form: "18%" + */ + public static String formatHumidity(Context context, double humidity) { + int humidityFormatResourceId = R.string.format_humidity_percentage; + return String.format(context.getString(humidityFormatResourceId), humidity); + } + + /** + * Format pressure. + * + * @param context Android Context to access preferences and resources. + * @param pressure Percentage of pressure, e.g: 1024. + * @return Formatted pressure String in the following form: "18 hPa" + */ + public static String formatPressure(Context context, double pressure) { + int pressureFormatResourceId = R.string.format_pressure_hpa; + return String.format(context.getString(pressureFormatResourceId), pressure); + } + + /** + * This method uses the wind direction in degrees to determine compass direction as a + * String. (eg NW) The method will return the wind String in the following form: "2 km/h SW" + * + * @param context Android Context to access preferences and resources + * @param windSpeed Wind speed in kilometers / hour + * @param degrees Degrees as measured on a compass, NOT temperature degrees! + * See https://www.mathsisfun.com/geometry/degrees.html + * @return Wind String in the following form: "2 km/h SW" + */ + public static String formatWind(Context context, double windSpeed, double degrees) { + int windFormat = R.string.format_wind_kmh; + + if (!GoBeesPreferences.isMetric(context)) { + windFormat = R.string.format_wind_mph; + windSpeed = .621371192237334f * windSpeed; + } + + String direction = ""; + if (degrees >= 337.5 || degrees < 22.5) { + direction = "N"; + } else if (degrees >= 22.5 && degrees < 67.5) { + direction = "NE"; + } else if (degrees >= 67.5 && degrees < 112.5) { + direction = "E"; + } else if (degrees >= 112.5 && degrees < 157.5) { + direction = "SE"; + } else if (degrees >= 157.5 && degrees < 202.5) { + direction = "S"; + } else if (degrees >= 202.5 && degrees < 247.5) { + direction = "SW"; + } else if (degrees >= 247.5 && degrees < 292.5) { + direction = "W"; + } else if (degrees >= 292.5 && degrees < 337.5) { + direction = "NW"; + } + + return String.format(context.getString(windFormat), windSpeed, direction); + } + + /** + * Format rain/snow. + * + * @param context Android Context to access preferences and resources. + * @param volume Rain volume (mm), e.g: 3.25. + * @return Formatted rain/snow String in the following form: "0.1 mm" + */ + public static String formatRainSnow(Context context, double volume) { + int rainSnowFormatResourceId = R.string.format_rain_snow_mm; + return String.format(context.getString(rainSnowFormatResourceId), volume); + } + /** * Helper method to provide the icon resource id according to the weather condition id returned * by the OpenWeatherMap call. * - * @param weatherIconId from OpenWeatherMap API response + * @param weatherIconId from OpenWeatherMap API response. * See http://openweathermap.org/weather-conditions for a list of all IDs. * @return resource id for the corresponding icon. day_clear_sky if no relation is found. */ @@ -106,6 +182,237 @@ public static int getWeatherIconResourceId(String weatherIconId) { } } + /** + * Helper method to provide the string according to the weather + * condition id returned by the OpenWeatherMap call. + * + * @param context Android context. + * @param weatherId from OpenWeatherMap API response. + * See http://openweathermap.org/weather-conditions for a list of all IDs + * @return String for the weather condition, condition_unknown if no relation is found. + */ + public static String getStringForWeatherCondition(Context context, int weatherId) { + int stringId; + switch (weatherId) { + case 200: + stringId = R.string.condition_200; + break; + case 201: + stringId = R.string.condition_201; + break; + case 202: + stringId = R.string.condition_202; + break; + case 210: + stringId = R.string.condition_210; + break; + case 211: + stringId = R.string.condition_211; + break; + case 212: + stringId = R.string.condition_212; + break; + case 221: + stringId = R.string.condition_221; + break; + case 230: + stringId = R.string.condition_230; + break; + case 231: + stringId = R.string.condition_231; + break; + case 232: + stringId = R.string.condition_232; + break; + case 300: + stringId = R.string.condition_300; + break; + case 301: + stringId = R.string.condition_301; + break; + case 302: + stringId = R.string.condition_302; + break; + case 310: + stringId = R.string.condition_310; + break; + case 311: + stringId = R.string.condition_311; + break; + case 312: + stringId = R.string.condition_312; + break; + case 313: + stringId = R.string.condition_313; + break; + case 314: + stringId = R.string.condition_314; + break; + case 321: + stringId = R.string.condition_321; + break; + case 500: + stringId = R.string.condition_500; + break; + case 501: + stringId = R.string.condition_501; + break; + case 502: + stringId = R.string.condition_502; + break; + case 503: + stringId = R.string.condition_503; + break; + case 504: + stringId = R.string.condition_504; + break; + case 511: + stringId = R.string.condition_511; + break; + case 520: + stringId = R.string.condition_520; + break; + case 531: + stringId = R.string.condition_531; + break; + case 600: + stringId = R.string.condition_600; + break; + case 601: + stringId = R.string.condition_601; + break; + case 602: + stringId = R.string.condition_602; + break; + case 611: + stringId = R.string.condition_611; + break; + case 612: + stringId = R.string.condition_612; + break; + case 615: + stringId = R.string.condition_615; + break; + case 616: + stringId = R.string.condition_616; + break; + case 620: + stringId = R.string.condition_620; + break; + case 621: + stringId = R.string.condition_621; + break; + case 622: + stringId = R.string.condition_622; + break; + case 701: + stringId = R.string.condition_701; + break; + case 711: + stringId = R.string.condition_711; + break; + case 721: + stringId = R.string.condition_721; + break; + case 731: + stringId = R.string.condition_731; + break; + case 741: + stringId = R.string.condition_741; + break; + case 751: + stringId = R.string.condition_751; + break; + case 761: + stringId = R.string.condition_761; + break; + case 762: + stringId = R.string.condition_762; + break; + case 771: + stringId = R.string.condition_771; + break; + case 781: + stringId = R.string.condition_781; + break; + case 800: + stringId = R.string.condition_800; + break; + case 801: + stringId = R.string.condition_801; + break; + case 802: + stringId = R.string.condition_802; + break; + case 803: + stringId = R.string.condition_803; + break; + case 804: + stringId = R.string.condition_804; + break; + case 900: + stringId = R.string.condition_900; + break; + case 901: + stringId = R.string.condition_901; + break; + case 902: + stringId = R.string.condition_902; + break; + case 903: + stringId = R.string.condition_903; + break; + case 904: + stringId = R.string.condition_904; + break; + case 905: + stringId = R.string.condition_905; + break; + case 906: + stringId = R.string.condition_906; + break; + case 951: + stringId = R.string.condition_951; + break; + case 952: + stringId = R.string.condition_952; + break; + case 953: + stringId = R.string.condition_953; + break; + case 954: + stringId = R.string.condition_954; + break; + case 955: + stringId = R.string.condition_955; + break; + case 956: + stringId = R.string.condition_956; + break; + case 957: + stringId = R.string.condition_957; + break; + case 958: + stringId = R.string.condition_958; + break; + case 959: + stringId = R.string.condition_959; + break; + case 960: + stringId = R.string.condition_960; + break; + case 961: + stringId = R.string.condition_961; + break; + case 962: + stringId = R.string.condition_962; + break; + default: + return context.getString(R.string.condition_unknown, weatherId); + } + return context.getString(stringId); + } + /** * Convert dp to pixels. * diff --git a/app/src/main/res/drawable-anydpi/ic_map.xml b/app/src/main/res/drawable-anydpi/ic_map.xml new file mode 100644 index 00000000..7bdf181b --- /dev/null +++ b/app/src/main/res/drawable-anydpi/ic_map.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/apiary_info_frag.xml b/app/src/main/res/layout/apiary_info_frag.xml index 8cf2f55d..c5183951 100644 --- a/app/src/main/res/layout/apiary_info_frag.xml +++ b/app/src/main/res/layout/apiary_info_frag.xml @@ -24,194 +24,454 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - + android:layout_height="match_parent"> - + android:orientation="vertical"> - - - + android:layout_marginEnd="8dp" + android:layout_marginStart="8dp" + android:layout_marginTop="16dp"> - - + android:orientation="vertical" + android:paddingBottom="24dp" + android:paddingEnd="16dp" + android:paddingStart="16dp" + android:paddingTop="24dp"> + + + android:layout_marginBottom="8dp" + android:orientation="horizontal"> - + + + android:layout_weight="1" + android:orientation="vertical"> - + - - + + - - - + + + + android:layout_marginBottom="8dp" + android:orientation="horizontal"> - + + + android:orientation="vertical"> - + - - + - - - + + + android:layout_marginBottom="8dp" + android:orientation="horizontal"> + + - + android:orientation="vertical"> - + + + + + + + + + + + + android:layout_height="wrap_content" + android:orientation="vertical"> + + + + + + + + android:orientation="vertical" + android:paddingBottom="16dp" + android:paddingEnd="16dp" + android:paddingStart="16dp" + android:paddingTop="24dp"> + + - + + + + + + + + + + + + + + + + + android:baselineAligned="false" + android:orientation="horizontal" + android:paddingEnd="24dp" + android:paddingStart="24dp"> - + + + + + + + + + + + + + + + + + + + android:layout_weight="1" + android:gravity="center_horizontal" + android:orientation="vertical"> + + + + + + + + + + + + + + + + + + - - - + + + - diff --git a/app/src/main/res/layout/hive_info_frag.xml b/app/src/main/res/layout/hive_info_frag.xml index 54799c8b..19011d25 100644 --- a/app/src/main/res/layout/hive_info_frag.xml +++ b/app/src/main/res/layout/hive_info_frag.xml @@ -62,7 +62,7 @@ diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index b2f741c5..3527bb58 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -24,12 +24,12 @@ - @string/pref_temp_units_label_metric - @string/pref_temp_units_label_imperial + @string/pref_weather_units_label_metric + @string/pref_weather_units_label_imperial - @string/pref_temp_units_metric - @string/pref_temp_units_imperial + @string/pref_weather_units_metric + @string/pref_weather_units_imperial diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 38ec5090..a3982251 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,20 +29,10 @@ GoBees logo Refresh - - Temperature - - Rain - - Wind Edit Delete - - %1.0f\u00B0C - - %1.0f\u00B0F Permission denied @@ -52,6 +42,138 @@ The app does not have permissions to use this feature. + + + + + + + Condition + + Temperature + + Humidity + + Pressure + + Wind + + Rain + + Snow + + \?\u00B0C + + \?% + + \? hPa + + \? km/h + + \? mm + + %1.0f\u00B0C + + %1.0f\u00B0F + + %1.0f%% + + %1.0f hPa + + + %1.0f km/h - + %2$s + + + + %1.0f mph - + %2$s + + + %1.0f mm + + Updated + + \? days ago + + OpenWeatherMap.org + + Thunderstorm with light rain + Thunderstorm with rain + Thunderstorm with heavy rain + Light thunderstorm + Thunderstorm + Heavy thunderstorm + Ragged thunderstorm + Thunderstorm with light drizzle + Thunderstorm with drizzle + Thunderstorm with heavy drizzle + Light intensity drizzle + Drizzle + Heavy drizzle + Light drizzle rain + Drizzle rain + Heavy drizzle rain + Shower rain and drizzle + Heavy shower rain and drizzle + Shower drizzle + Light rain + Moderate rain + Heavy rain + Very heavy rain + Extreme rain + Freezing rain + Light shower rain + Shower rain + Heavy shower rain + Ragged shower rain + Light snow + Snow + Heavy snow + Sleet + Shower sleet + Light rain and snow + Rain and snow + Light shower snow + Shower snow + Heavy shower snow + Mist + Smoke + Haze + Sand, dust whirls + Fog + Sand + Dust + Volcanic ash + Squalls + Tornado + Clear sky + Mostly clear + Scattered clouds + Broken clouds + Overcast clouds + Tornado + Tropical storm + Hurricane + Cold + Hot + Windy + Hail + Calm + Light breeze + Gentle breeze + Moderate breeze + Fresh breeze + Strong breeze + High wind + Gale + Severe gale + Storm + Violent storm + Hurricane + Unknown (%1$d) + + @@ -72,6 +194,8 @@ Get GPS location Location + + Map Number of hives @@ -90,8 +214,6 @@ My apiary 0 - - 10\u00B0C Error while loading apiaries. @@ -162,7 +284,7 @@ Last revision icon - Last revision icon + Notes Hive logo @@ -175,6 +297,8 @@ No location + + Burgos @@ -384,17 +508,17 @@ Weather weather - - Temperature Units - - Metric (\u00B0C) - - Imperial (\u00B0F) - - units - - metric - - imperial + + Weather Units + + Metric (\u00B0C, km/h…) + + Imperial (\u00B0F, mph…) + + units + + metric + + imperial diff --git a/app/src/main/res/xml/general_settings.xml b/app/src/main/res/xml/general_settings.xml index 8d496529..d61df029 100644 --- a/app/src/main/res/xml/general_settings.xml +++ b/app/src/main/res/xml/general_settings.xml @@ -23,10 +23,10 @@ android:key="@string/pref_weather_cat_key" android:title="@string/pref_weather_cat_label"> + android:key="@string/pref_weather_units_key" + android:title="@string/pref_weather_units_label"/> \ No newline at end of file From bd9f2a3e3668fad069750b86118901d0a43d67a6 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Wed, 11 Jan 2017 00:59:14 +0100 Subject: [PATCH 11/14] Generate random apiary location #143 --- .../data/model/mothers/ApiaryMother.java | 39 +++++++++++++++++-- app/src/main/res/layout/apiary_info_frag.xml | 2 +- app/src/main/res/values/strings.xml | 8 ++-- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java index 556a88ba..91375374 100644 --- a/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java +++ b/app/src/main/java/com/davidmiguel/gobees/data/model/mothers/ApiaryMother.java @@ -18,10 +18,14 @@ package com.davidmiguel.gobees.data.model.mothers; +import android.location.Location; + import com.davidmiguel.gobees.data.model.Apiary; import com.davidmiguel.gobees.data.model.Hive; import com.davidmiguel.gobees.data.model.MeteoRecord; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; import java.util.Random; @@ -38,12 +42,15 @@ public class ApiaryMother { private static final String NAME_PREFIX = "Apiary"; private static final int MAX_ID = 1000; private static final int NUM_HIVES = 6; + private static final double LAT = 42.352083; + private static final double LON = -3.697586; + private long id; private String name; private String imageUrl; - private Double locationLong; private Double locationLat; + private Double locationLong; private String notes; private RealmList hives; private MeteoRecord currentWeather; @@ -85,11 +92,18 @@ public static Apiary newDefaultApiary(int numHives) { } private void setValues(int numHives) { + // Generate id Random r = new Random(System.nanoTime()); id = r.nextInt(MAX_ID); + // Generate name name = NAME_PREFIX + " " + id; + // Generate hives List generatedHives = generateHives(numHives); hives = new RealmList<>(generatedHives.toArray(new Hive[generatedHives.size()])); + // Generate location + Location location = getRandomNearLocation(LAT, LON); + locationLat = location.getLatitude(); + locationLong = location.getLongitude(); } private ApiaryMother withName(String name) { @@ -103,8 +117,8 @@ private ApiaryMother withNotes(String notes) { } private Apiary build() { - return new Apiary(id, name, imageUrl, locationLong, - locationLat, notes, hives, currentWeather, meteoRecords); + return new Apiary(id, name, imageUrl, locationLat, locationLong, + notes, hives, currentWeather, meteoRecords); } private List generateHives(int num) { @@ -114,4 +128,23 @@ private List generateHives(int num) { } return hives; } + + /** + * Generate random location. + * + * @param latitude center latitude. + * @param longitude center longitude. + * @return random location. + */ + private Location getRandomNearLocation(double latitude, double longitude) { + Random random = new Random(); + double lat = new BigDecimal(latitude + random.nextInt(100) / 100d) + .setScale(7, RoundingMode.HALF_UP).doubleValue(); + double lon = new BigDecimal(longitude + random.nextInt(100) / 100d) + .setScale(7, RoundingMode.HALF_UP).doubleValue(); + Location location = new Location(""); + location.setLatitude(lat); + location.setLongitude(lon); + return location; + } } \ No newline at end of file diff --git a/app/src/main/res/layout/apiary_info_frag.xml b/app/src/main/res/layout/apiary_info_frag.xml index c5183951..6dfee84e 100644 --- a/app/src/main/res/layout/apiary_info_frag.xml +++ b/app/src/main/res/layout/apiary_info_frag.xml @@ -466,7 +466,7 @@ android:layout_height="match_parent" android:layout_marginTop="8dp" android:gravity="right" - android:text="@string/openweathermap" + android:text="@string/open_weather_map" android:textColor="@color/colorSecondaryText" android:textSize="10sp"/> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a3982251..1bee2f61 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -81,22 +81,22 @@ %1.0f hPa - %1.0f km/h - + %1$1.0f km/h - %2$s - %1.0f mph - + %1$1.0f mph - %2$s - %1.0f mm + %1.2f mm Updated \? days ago - OpenWeatherMap.org + OpenWeatherMap.org Thunderstorm with light rain Thunderstorm with rain From 38f5f8ec3ce6d12f30f9aa9a03ca950036c9cca6 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Wed, 11 Jan 2017 01:02:16 +0100 Subject: [PATCH 12/14] Fix open map with no location #143 --- .../gobees/apiary/ApiaryInfoFragment.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java index c3a62a8d..05d9c171 100644 --- a/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java +++ b/app/src/main/java/com/davidmiguel/gobees/apiary/ApiaryInfoFragment.java @@ -242,13 +242,15 @@ public void showInfo(Apiary apiary, Date lastRevisionDate) { @Override public void openMap(Apiary apiary) { - // Change icon color - map.setColorFilter(ContextCompat.getColor(getContext(), R.color.colorPrimaryDark)); - // Open map - String uri = String.format(Locale.ENGLISH, "geo:%f,%f", - apiary.getLocationLat(), apiary.getLocationLong()); - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); - getContext().startActivity(intent); + if (apiary.hasLocation()) { + // Change icon color + map.setColorFilter(ContextCompat.getColor(getContext(), R.color.colorPrimaryDark)); + // Open map + String uri = String.format(Locale.ENGLISH, "geo:%f,%f", + apiary.getLocationLat(), apiary.getLocationLong()); + Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri)); + getContext().startActivity(intent); + } } @Override From 9f78cf199f64d32aa1372ce01cb50ef3c88c5af5 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Wed, 11 Jan 2017 14:01:09 +0100 Subject: [PATCH 13/14] Fix apiary presenter test @143 --- .../com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java index c53af11e..cddb8882 100644 --- a/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java +++ b/app/src/test/java/com/davidmiguel/gobees/apiary/ApiaryPresenterTest.java @@ -53,6 +53,9 @@ public class ApiaryPresenterTest { @Mock private ApiaryContract.ApiaryHivesView apiaryHivesView; + @Mock + private ApiaryContract.ApiaryInfoView apiaryInfoView; + private ApiaryPresenter apiaryPresenter; @Captor @@ -67,7 +70,8 @@ public void setupHivesPresenter() { MockitoAnnotations.initMocks(this); // Get a reference to the class under test - apiaryPresenter = new ApiaryPresenter(goBeesRepository, apiaryHivesView, APIARY_ID); + apiaryPresenter = new ApiaryPresenter(goBeesRepository, + apiaryHivesView, apiaryInfoView, APIARY_ID); // The presenter won't update the view unless it's active when(apiaryHivesView.isActive()).thenReturn(true); From cf8ee48fbba0360c13fe9f0532b1ac38890930a4 Mon Sep 17 00:00:00 2001 From: davidmigloz Date: Wed, 11 Jan 2017 14:09:52 +0100 Subject: [PATCH 14/14] Bumped version number to 0.6 --- app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 36d881c2..410847bc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,8 +28,8 @@ android { applicationId "com.davidmiguel.gobees" minSdkVersion 19 targetSdkVersion 25 - versionCode 5 - versionName "v0.5" + versionCode 6 + versionName "v0.6" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" }