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

Commit

Permalink
Merge branch 'release-0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmigloz committed Dec 20, 2016
2 parents dfe9c9f + 287dd6f commit 6bb81f5
Show file tree
Hide file tree
Showing 185 changed files with 5,955 additions and 1,082 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ android:
- android-25
- extra-android-support
- extra-android-m2repository
- extra-google-m2repository
- extra-google-google_play_services
- ${ANDROID_TARGET}
- sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[![codecov](https://codecov.io/gh/davidmigloz/go-bees/branch/master/graph/badge.svg)](https://codecov.io/gh/davidmigloz/go-bees)
[![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=latest)](http://go-bees.readthedocs.io/es/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/go-bees/badge/?version=develop)](http://go-bees.readthedocs.io/es/develop/?badge=develop)
35 changes: 19 additions & 16 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.davidmiguel.gobees"
minSdkVersion 19
targetSdkVersion 25
versionCode 2
versionName "0.2"
versionCode 3
versionName "v0.3"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
Expand Down Expand Up @@ -46,7 +46,7 @@ android {

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

dependencies {
// App's dependencies, including test
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.android.support:support-v4:25.0.1'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.github.davidmigloz:opencv-android-gradle-repo:3.1.0'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.guava:guava:20.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.vanniktech:vntnumberpickerpreference:1.0.0'

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

// Dependencies for Android unit tests
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.mockito:mockito-core:2.2.22'
androidTestCompile 'org.mockito:mockito-core:2.2.26'

// Espresso UI Testing
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'

// Resolve conflicts between main and test APK:
androidTestCompile 'com.android.support:support-annotations:25.0.1'
androidTestCompile 'com.android.support:support-v4:25.0.1'
androidTestCompile 'com.android.support:recyclerview-v7:25.0.1'
androidTestCompile 'com.android.support:appcompat-v7:25.0.1'
androidTestCompile 'com.android.support:design:25.0.1'
androidTestCompile 'com.android.support:support-annotations:25.1.0'
androidTestCompile 'com.android.support:support-v4:25.1.0'
androidTestCompile 'com.android.support:recyclerview-v7:25.1.0'
androidTestCompile 'com.android.support:appcompat-v7:25.1.0'
androidTestCompile 'com.android.support:design:25.1.0'
}

/*
Expand Down Expand Up @@ -136,4 +139,4 @@ Run copy test resources directory tasks before build.
*/
afterEvaluate {
preBuild.dependsOn(copyResDirectoryToTestMockDebugClasses)
}
}
33 changes: 26 additions & 7 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<uses-feature android:name="android.hardware.camera"/>
<uses-feature
Expand All @@ -13,28 +14,46 @@
android:required="false"/>

<application
android:name=".GoBeesApp"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".GoBeesApp"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name="com.davidmiguel.gobees.apiaries.ApiariesActivity"
android:name=".apiaries.ApiariesActivity"
android:launchMode="singleTop"
android:theme="@style/AppTheme.OverlapSystemBar">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".addeditapiary.AddEditApiaryActivity" />
<activity
android:name=".hives.HivesActivity"
android:parentActivityName=".apiaries.ApiariesActivity" />
<activity android:name=".addedithive.AddEditHiveActivity" />
android:name=".addeditapiary.AddEditApiaryActivity"
android:parentActivityName=".apiaries.ApiariesActivity"/>
<activity
android:name=".apiary.ApiaryActivity"
android:launchMode="singleTop"
android:parentActivityName=".apiaries.ApiariesActivity"/>
<activity
android:name=".premonitoring.PreMonitoringActivity"
android:name=".addedithive.AddEditHiveActivity"
android:parentActivityName=".apiary.ApiaryActivity"/>
<activity
android:name=".hive.HiveActivity"
android:launchMode="singleTop"
android:parentActivityName=".apiary.ApiaryActivity"/>
<activity
android:name=".recording.RecordingActivity"
android:parentActivityName=".hive.HiveActivity"/>
<activity
android:name=".monitoring.MonitoringActivity"
android:parentActivityName=".hive.HiveActivity"
android:screenOrientation="landscape"/>
<activity
android:name=".settings.SettingsActivity"
android:parentActivityName=".apiaries.ApiariesActivity"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.davidmiguel.gobees.R;
import com.davidmiguel.gobees.data.source.cache.GoBeesRepository;
import com.davidmiguel.gobees.utils.ActivityUtils;
import com.google.common.base.Strings;

/**
* Add / edit apiary activity.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,43 +1,70 @@
package com.davidmiguel.gobees.addeditapiary;

import android.content.Context;
import android.location.Location;

import com.davidmiguel.gobees.utils.BasePresenter;
import com.davidmiguel.gobees.utils.BaseView;

/**
* This specifies the contract between the view and the presenter.
*/
public interface AddEditApiaryContract {
interface AddEditApiaryContract {

interface View extends BaseView<Presenter> {

/**
* Shows message warning that the apiary cannot be empty.
* Sets apiary name in the text view.
*
* @param name apiary name.
*/
void showEmptyApiaryError();
void setName(String name);

/**
* Shows save error message.
* Sets apiary location in the text view.
*
* @param location current location.
*/
void showSaveApiaryError();
void setLocation(Location location);

/**
* Sets apiary notes in the text view.
*
* @param notes apiary notes.
*/
void setNotes(String notes);

/**
* Set the location icon active or inactive.
*
* @param active status.
*/
void setLocationIcon(boolean active);

/**
* Goes back to apiaries activity.
*/
void showApiariesList();

/**
* Sets apiary name in the text view.
*
* @param name apiary name.
* Shows message informing that the GPS is running.
*/
void setName(String name);
void showSearchingGpsMsg();

/**
* Sets apiary notes in the text view.
*
* @param notes apiary notes.
* Shows message warning that the apiary cannot be empty.
*/
void setNotes(String notes);
void showEmptyApiaryError();

/**
* Shows message warning that we cannot connect to GPS.
*/
void showGpsConnectionError();

/**
* Shows save error message.
*/
void showSaveApiaryError();
}

interface Presenter extends BasePresenter {
Expand All @@ -54,5 +81,17 @@ interface Presenter extends BasePresenter {
* Fill apiary data (the apiary must already exist in the repository).
*/
void populateApiary();

/**
* Start/stop location service.
*
* @param context context.
*/
void toogleLocation(Context context);

/**
* Stop location service.
*/
void stopLocation();
}
}
Loading

0 comments on commit 6bb81f5

Please sign in to comment.