Skip to content
This repository has been archived by the owner on Feb 13, 2025. It is now read-only.

Commit

Permalink
Merge branch 'release/v1.4'
Browse files Browse the repository at this point in the history
* release/v1.4: (45 commits)
  Added final binaries
  Updated read images
  Reverted son writer functionality due to creating corrupt files
  Update adapter correctly when taking image from view photos fragment
  Added generated line
  Removed file counter
  Added media scanner
  Keep timestamp in image name
  Moved image export into background thread
  Refactored plant details layout to be more efficient
  Refactored save method to be more efficient
  Fixed ppm averages not being set
  Re-structured export to do most in background thread
  Updated statistics counter
  Remove trailing comma from grow log
  Added notification for export
  Removed class description
  Added license for zip4j
  Set version of the app and bumped dependency versions
  Updated icon
  ...
  • Loading branch information
7LPdWcaW committed Jul 14, 2016
2 parents 9aac818 + a0c870a commit 271247a
Show file tree
Hide file tree
Showing 45 changed files with 1,770 additions and 895 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

Welcome to grow tracker. This app was created to help record data about growing plants in order to monitor the growing conditions to help make the plants grow better, and identify potential issues during the grow process.

[Latest APK: (MD5) 6a8550c5a3e7ea5ecbec069c1ae1ed94 v1.3](https://github.com/7LPdWcaW/GrowTracker-Android/raw/master/app/app-production-release.apk)
[Latest APK: (MD5) 76b87bfbc65e82ca9daa6a64667c0754 v1.4](https://github.com/7LPdWcaW/GrowTracker-Android/raw/master/app/app-production-release.apk)

[Latest APK (Discrete): (MD5) 9b23966029676f5bf55646fb279ee10a v1.3](https://github.com/7LPdWcaW/GrowTracker-Android/raw/master/app/app-discrete-release.apk)
[Latest APK (Discrete): (MD5) 0aa79c2772507ebb42cd55a0be8c2f52 v1.4](https://github.com/7LPdWcaW/GrowTracker-Android/raw/master/app/app-discrete-release.apk)

# Installation

Expand Down
Binary file modified app/app-discrete-release.apk
Binary file not shown.
Binary file modified app/app-production-release.apk
Binary file not shown.
15 changes: 8 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ repositories {
}

android {
compileSdkVersion 22
compileSdkVersion 24
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "me.anon.grow"
minSdkVersion 15
targetSdkVersion 22
versionCode 4
versionName "1.3"
versionCode 5
versionName "1.4"
}

lintOptions {
Expand All @@ -33,12 +33,13 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.kennyc:snackbar:2.0.2'
compile 'com.github.PhilJay:MPAndroidChart:v2.1.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.1.4'
compile 'net.lingala.zip4j:zip4j:1.3.2'
}
18 changes: 18 additions & 0 deletions app/src/main/assets/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,24 @@ <h1>Open source libraries</h1>

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.
</pre>
</div>

<div>
<b><a href="http://www.lingala.net/zip4j">Zip4j</a></b>
<br />
<pre>
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.
Expand Down
40 changes: 26 additions & 14 deletions app/src/main/java/me/anon/controller/adapter/ActionAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ public interface OnActionSelectListener
{
final Action action = actions.get(i);

if (action == null) return;

DateFormat dateFormat = android.text.format.DateFormat.getDateFormat(viewHolder.getDate().getContext());
DateFormat timeFormat = android.text.format.DateFormat.getTimeFormat(viewHolder.getDate().getContext());

Expand All @@ -81,24 +83,34 @@ public interface OnActionSelectListener
viewHolder.getCard().setCardBackgroundColor(0xffffffff);

String summary = "";
if (action instanceof Feed)
if (action.getClass() == Feed.class)
{
viewHolder.getCard().setCardBackgroundColor(0x9A90CAF9);
viewHolder.getName().setText("Feed with nutrients");

if (((Feed)action).getNutrient() != null)
{
summary += "<b>";
summary += ((Feed)action).getNutrient().getNpc() == null ? "-" : ((Feed)action).getNutrient().getNpc();
summary += " : ";
summary += "</b>:<b>";
summary += ((Feed)action).getNutrient().getPpc() == null ? "-" : ((Feed)action).getNutrient().getPpc();
summary += " : ";
summary += "</b>:<b>";
summary += ((Feed)action).getNutrient().getKpc() == null ? "-" : ((Feed)action).getNutrient().getKpc();
summary += "/";
summary += ((Feed)action).getNutrient().getCapc() == null ? "-" : ((Feed)action).getNutrient().getCapc();
summary += " : ";
summary += ((Feed)action).getNutrient().getSpc() == null ? "-" : ((Feed)action).getNutrient().getSpc();
summary += " : ";
summary += ((Feed)action).getNutrient().getMgpc() == null ? "-" : ((Feed)action).getNutrient().getMgpc();
summary += "</b>";

if (((Feed)action).getNutrient().getMgpc() != null
|| ((Feed)action).getNutrient().getSpc() != null
|| ((Feed)action).getNutrient().getCapc() != null)
{
summary += " / <b>";
summary += ((Feed)action).getNutrient().getCapc() == null ? "-" : ((Feed)action).getNutrient().getCapc();
summary += "</b>:<b>";
summary += ((Feed)action).getNutrient().getSpc() == null ? "-" : ((Feed)action).getNutrient().getSpc();
summary += "</b>:<b>";
summary += ((Feed)action).getNutrient().getMgpc() == null ? "-" : ((Feed)action).getNutrient().getMgpc();
summary += "</b>";
}

summary += " (";
summary += ((Feed)action).getMlpl() == null ? "n/a" : ((Feed)action).getMlpl() + "ml/l";
summary += ")";
Expand All @@ -109,14 +121,14 @@ public interface OnActionSelectListener

if (((Feed)action).getPh() != null)
{
waterStr.append("<b>PH: </b>");
waterStr.append("<b>In pH: </b>");
waterStr.append(((Feed)action).getPh());
waterStr.append(", ");
}

if (((Feed)action).getRunoff() != null)
{
waterStr.append("<b>Runoff: </b>");
waterStr.append("<b>Out pH: </b>");
waterStr.append(((Feed)action).getRunoff());
waterStr.append(", ");
}
Expand Down Expand Up @@ -148,22 +160,22 @@ public interface OnActionSelectListener

summary += waterStr.toString().length() > 0 ? waterStr.toString().substring(0, waterStr.length() - 2) : "";
}
else if (action instanceof Water)
else if (action.getClass() == Water.class)
{
viewHolder.getCard().setCardBackgroundColor(0x9ABBDEFB);
viewHolder.getName().setText("Watered");
StringBuilder waterStr = new StringBuilder();

if (((Water)action).getPh() != null)
{
waterStr.append("<b>PH: </b>");
waterStr.append("<b>In pH: </b>");
waterStr.append(((Water)action).getPh());
waterStr.append(", ");
}

if (((Water)action).getRunoff() != null)
{
waterStr.append("<b>Runoff: </b>");
waterStr.append("<b>Out pH: </b>");
waterStr.append(((Water)action).getRunoff());
waterStr.append(", ");
}
Expand Down
25 changes: 20 additions & 5 deletions app/src/main/java/me/anon/controller/adapter/PlantAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ public void setPlants(List<Plant> plants)
{
Action action = actions.get(index);

if (action instanceof Feed && lastFeed == null)
if (action.getClass() == Feed.class && lastFeed == null)
{
lastFeed = (Feed)action;
}
else if (action instanceof Water && lastWater == null)
else if (action.getClass() == Water.class && lastWater == null)
{
lastWater = (Water)action;
}
Expand Down Expand Up @@ -141,11 +141,26 @@ else if (action instanceof Water && lastWater == null)
{
summary += " of <b>";
summary += lastFeed.getNutrient().getNpc() == null ? "-" : lastFeed.getNutrient().getNpc();
summary += " : ";
summary += "</b>:<b>";
summary += lastFeed.getNutrient().getPpc() == null ? "-" : lastFeed.getNutrient().getPpc();
summary += " : ";
summary += "</b>:<b>";
summary += lastFeed.getNutrient().getKpc() == null ? "-" : lastFeed.getNutrient().getKpc();
summary += "</b><br/>";
summary += "</b>";

if (lastFeed.getNutrient().getMgpc() != null
|| lastFeed.getNutrient().getSpc() != null
|| lastFeed.getNutrient().getCapc() != null)
{
summary += "/<b>";
summary += lastFeed.getNutrient().getCapc() == null ? "-" : lastFeed.getNutrient().getCapc();
summary += "</b>:<b>";
summary += lastFeed.getNutrient().getSpc() == null ? "-" : lastFeed.getNutrient().getSpc();
summary += "</b>:<b>";
summary += lastFeed.getNutrient().getMgpc() == null ? "-" : lastFeed.getNutrient().getMgpc();
summary += "</b>";
}

summary += "<br/>";
}

if (lastFeed.getPh() != null)
Expand Down
Loading

0 comments on commit 271247a

Please sign in to comment.