Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit 6bb81f5

Browse files
committed
Merge branch 'release-0.3'
2 parents dfe9c9f + 287dd6f commit 6bb81f5

File tree

185 files changed

+5955
-1082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+5955
-1082
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ android:
1515
- android-25
1616
- extra-android-support
1717
- extra-android-m2repository
18+
- extra-google-m2repository
19+
- extra-google-google_play_services
1820
- ${ANDROID_TARGET}
1921
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}
2022

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
[![codecov](https://codecov.io/gh/davidmigloz/go-bees/branch/master/graph/badge.svg)](https://codecov.io/gh/davidmigloz/go-bees)
77
[![Code Climate](https://codeclimate.com/github/davidmigloz/go-bees/badges/gpa.svg)](https://codeclimate.com/github/davidmigloz/go-bees)
88
[![Dependency Status](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/57f7b19e823b88004e06ad33)
9-
[![Documentation Status](https://readthedocs.org/projects/go-bees/badge/?version=latest)](http://go-bees.readthedocs.io/es/latest/?badge=latest)
9+
[![Documentation Status](https://readthedocs.org/projects/go-bees/badge/?version=develop)](http://go-bees.readthedocs.io/es/develop/?badge=develop)

app/build.gradle

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.davidmiguel.gobees"
1111
minSdkVersion 19
1212
targetSdkVersion 25
13-
versionCode 2
14-
versionName "0.2"
13+
versionCode 3
14+
versionName "v0.3"
1515

1616
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1717
}
@@ -46,7 +46,7 @@ android {
4646

4747
// Remove mockRelease as it's not needed.
4848
android.variantFilter { variant ->
49-
if(variant.buildType.name.equals('release')
49+
if (variant.buildType.name.equals('release')
5050
&& variant.getFlavors().get(0).name.equals('mock')) {
5151
variant.setIgnore(true);
5252
}
@@ -73,14 +73,17 @@ sourceSets {
7373

7474
dependencies {
7575
// App's dependencies, including test
76-
compile 'com.android.support:recyclerview-v7:25.0.1'
77-
compile 'com.android.support:appcompat-v7:25.0.1'
78-
compile 'com.android.support:design:25.0.1'
79-
compile 'com.android.support:cardview-v7:25.0.1'
80-
compile 'com.android.support:support-v4:25.0.1'
76+
compile 'com.android.support:recyclerview-v7:25.1.0'
77+
compile 'com.android.support:appcompat-v7:25.1.0'
78+
compile 'com.android.support:design:25.1.0'
79+
compile 'com.android.support:cardview-v7:25.1.0'
80+
compile 'com.android.support:support-v4:25.1.0'
8181
compile 'com.github.davidmigloz:opencv-android-gradle-repo:3.1.0'
82+
compile 'com.google.android.gms:play-services-location:10.0.1'
8283
compile 'com.google.guava:guava:20.0'
83-
compile 'com.makeramen:roundedimageview:2.2.1'
84+
compile 'com.makeramen:roundedimageview:2.3.0'
85+
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
86+
compile 'com.vanniktech:vntnumberpickerpreference:1.0.0'
8487

8588
// Dependencies for local unit tests
8689
testCompile 'junit:junit:4.12'
@@ -95,19 +98,19 @@ dependencies {
9598

9699
// Dependencies for Android unit tests
97100
androidTestCompile 'junit:junit:4.12'
98-
androidTestCompile 'org.mockito:mockito-core:2.2.22'
101+
androidTestCompile 'org.mockito:mockito-core:2.2.26'
99102

100103
// Espresso UI Testing
101104
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
102105
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
103106
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'
104107

105108
// Resolve conflicts between main and test APK:
106-
androidTestCompile 'com.android.support:support-annotations:25.0.1'
107-
androidTestCompile 'com.android.support:support-v4:25.0.1'
108-
androidTestCompile 'com.android.support:recyclerview-v7:25.0.1'
109-
androidTestCompile 'com.android.support:appcompat-v7:25.0.1'
110-
androidTestCompile 'com.android.support:design:25.0.1'
109+
androidTestCompile 'com.android.support:support-annotations:25.1.0'
110+
androidTestCompile 'com.android.support:support-v4:25.1.0'
111+
androidTestCompile 'com.android.support:recyclerview-v7:25.1.0'
112+
androidTestCompile 'com.android.support:appcompat-v7:25.1.0'
113+
androidTestCompile 'com.android.support:design:25.1.0'
111114
}
112115

113116
/*
@@ -136,4 +139,4 @@ Run copy test resources directory tasks before build.
136139
*/
137140
afterEvaluate {
138141
preBuild.dependsOn(copyResDirectoryToTestMockDebugClasses)
139-
}
142+
}

app/src/main/AndroidManifest.xml

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:android="http://schemas.android.com/apk/res/android">
44

55
<uses-permission android:name="android.permission.CAMERA"/>
6+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
67

78
<uses-feature android:name="android.hardware.camera"/>
89
<uses-feature
@@ -13,28 +14,46 @@
1314
android:required="false"/>
1415

1516
<application
17+
android:name=".GoBeesApp"
1618
android:allowBackup="true"
1719
android:icon="@mipmap/ic_launcher"
1820
android:label="@string/app_name"
19-
android:name=".GoBeesApp"
2021
android:supportsRtl="true"
2122
android:theme="@style/AppTheme">
2223
<activity
23-
android:name="com.davidmiguel.gobees.apiaries.ApiariesActivity"
24+
android:name=".apiaries.ApiariesActivity"
25+
android:launchMode="singleTop"
2426
android:theme="@style/AppTheme.OverlapSystemBar">
2527
<intent-filter>
2628
<action android:name="android.intent.action.MAIN"/>
29+
2730
<category android:name="android.intent.category.LAUNCHER"/>
2831
</intent-filter>
2932
</activity>
30-
<activity android:name=".addeditapiary.AddEditApiaryActivity" />
3133
<activity
32-
android:name=".hives.HivesActivity"
33-
android:parentActivityName=".apiaries.ApiariesActivity" />
34-
<activity android:name=".addedithive.AddEditHiveActivity" />
34+
android:name=".addeditapiary.AddEditApiaryActivity"
35+
android:parentActivityName=".apiaries.ApiariesActivity"/>
36+
<activity
37+
android:name=".apiary.ApiaryActivity"
38+
android:launchMode="singleTop"
39+
android:parentActivityName=".apiaries.ApiariesActivity"/>
3540
<activity
36-
android:name=".premonitoring.PreMonitoringActivity"
41+
android:name=".addedithive.AddEditHiveActivity"
42+
android:parentActivityName=".apiary.ApiaryActivity"/>
43+
<activity
44+
android:name=".hive.HiveActivity"
45+
android:launchMode="singleTop"
46+
android:parentActivityName=".apiary.ApiaryActivity"/>
47+
<activity
48+
android:name=".recording.RecordingActivity"
49+
android:parentActivityName=".hive.HiveActivity"/>
50+
<activity
51+
android:name=".monitoring.MonitoringActivity"
52+
android:parentActivityName=".hive.HiveActivity"
3753
android:screenOrientation="landscape"/>
54+
<activity
55+
android:name=".settings.SettingsActivity"
56+
android:parentActivityName=".apiaries.ApiariesActivity"/>
3857
</application>
3958

4059
</manifest>

app/src/main/java/com/davidmiguel/gobees/addeditapiary/AddEditApiaryActivity.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import com.davidmiguel.gobees.R;
1010
import com.davidmiguel.gobees.data.source.cache.GoBeesRepository;
1111
import com.davidmiguel.gobees.utils.ActivityUtils;
12-
import com.google.common.base.Strings;
1312

1413
/**
1514
* Add / edit apiary activity.
Lines changed: 52 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,70 @@
11
package com.davidmiguel.gobees.addeditapiary;
22

3+
import android.content.Context;
4+
import android.location.Location;
5+
36
import com.davidmiguel.gobees.utils.BasePresenter;
47
import com.davidmiguel.gobees.utils.BaseView;
58

69
/**
710
* This specifies the contract between the view and the presenter.
811
*/
9-
public interface AddEditApiaryContract {
12+
interface AddEditApiaryContract {
1013

1114
interface View extends BaseView<Presenter> {
1215

1316
/**
14-
* Shows message warning that the apiary cannot be empty.
17+
* Sets apiary name in the text view.
18+
*
19+
* @param name apiary name.
1520
*/
16-
void showEmptyApiaryError();
21+
void setName(String name);
1722

1823
/**
19-
* Shows save error message.
24+
* Sets apiary location in the text view.
25+
*
26+
* @param location current location.
2027
*/
21-
void showSaveApiaryError();
28+
void setLocation(Location location);
29+
30+
/**
31+
* Sets apiary notes in the text view.
32+
*
33+
* @param notes apiary notes.
34+
*/
35+
void setNotes(String notes);
36+
37+
/**
38+
* Set the location icon active or inactive.
39+
*
40+
* @param active status.
41+
*/
42+
void setLocationIcon(boolean active);
2243

2344
/**
2445
* Goes back to apiaries activity.
2546
*/
2647
void showApiariesList();
2748

2849
/**
29-
* Sets apiary name in the text view.
30-
*
31-
* @param name apiary name.
50+
* Shows message informing that the GPS is running.
3251
*/
33-
void setName(String name);
52+
void showSearchingGpsMsg();
3453

3554
/**
36-
* Sets apiary notes in the text view.
37-
*
38-
* @param notes apiary notes.
55+
* Shows message warning that the apiary cannot be empty.
3956
*/
40-
void setNotes(String notes);
57+
void showEmptyApiaryError();
58+
59+
/**
60+
* Shows message warning that we cannot connect to GPS.
61+
*/
62+
void showGpsConnectionError();
63+
64+
/**
65+
* Shows save error message.
66+
*/
67+
void showSaveApiaryError();
4168
}
4269

4370
interface Presenter extends BasePresenter {
@@ -54,5 +81,17 @@ interface Presenter extends BasePresenter {
5481
* Fill apiary data (the apiary must already exist in the repository).
5582
*/
5683
void populateApiary();
84+
85+
/**
86+
* Start/stop location service.
87+
*
88+
* @param context context.
89+
*/
90+
void toogleLocation(Context context);
91+
92+
/**
93+
* Stop location service.
94+
*/
95+
void stopLocation();
5796
}
5897
}

0 commit comments

Comments
 (0)