Skip to content

Commit

Permalink
Merge branch 'develop' into matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
viktoria7211 committed May 6, 2021
2 parents cda8c9f + fde57db commit 1030334
Show file tree
Hide file tree
Showing 58 changed files with 1,760 additions and 136 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
/.idea/
3 changes: 0 additions & 3 deletions .idea/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/compiler.xml

This file was deleted.

21 changes: 0 additions & 21 deletions .idea/gradle.xml

This file was deleted.

25 changes: 0 additions & 25 deletions .idea/jarRepositories.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@
### Vision


The Hiker introduce a simple app that will be able to show several statistics for the user’s position and ambient, it will provide information about the altitude of the user, the speed of moving, position on the map, the step count and latitude/longitude using google services.
The Hiker introduce a simple app that will be able to do several measurements for the user’s position and ambient, it will provide information about:
* Altitude of the user
* Speed of moving
* Humidity

Furthermore the user will be able to use features such:
* Psition on the map
* Pedometer
* SOS message
* Dual language support (English & Russian)

In long terms The Hiker app tries to provide a useful app that will rise the awareness of the user regarding its environment and provides information about users ambient.


![MobileApp1](https://user-images.githubusercontent.com/79966516/114615879-7ec0c980-9ca6-11eb-85ac-ba26860b4a15.PNG)
![MobileApp2](https://user-images.githubusercontent.com/79966516/114615904-84b6aa80-9ca6-11eb-93ab-32ad477e2334.PNG)
Expand All @@ -36,7 +48,17 @@ The Hiker introduce a simple app that will be able to show several statistics fo
* Set this App as Mock Location Provider: Systems -> Advanced -> Developer Options -> Debugging -> Select Mock Location App
* Set it to None afterwards for a correct behavior of the App

---

### Known Limitations for Release 1:

* On the real device the LanguageIntegrationTests are failing. But the App shows the correct selected language, also on the real device. So the tests are failing but the Apps language behaviour is correct. (In the Simulator everything works correct.)
* This issue will be handled in the next Release.

---

### Implemented features

* Altitude of the user
* Position on map
* Dual language support (English & Russian)
16 changes: 16 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}

android {
Expand Down Expand Up @@ -34,12 +35,27 @@ android {

dependencies {

implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.2.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.2.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.3.0'
testImplementation 'org.mockito:mockito-core:2.24.5'
testImplementation 'org.mockito:mockito-inline:2.24.5'
androidTestImplementation 'org.mockito:mockito-android:2.24.5'
androidTestImplementation 'androidx.core:core-ktx:1.3.2'
androidTestImplementation 'androidx.test:rules:1.3.0'
androidTestImplementation 'org.mockito:mockito-android:2.24.5'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.2.0'
androidTestImplementation 'androidx.test:runner:1.3.0'

}
38 changes: 38 additions & 0 deletions app/src/androidTest/java/com/team28/thehiker/AltitudeUITest.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.team28.thehiker

import androidx.test.espresso.Espresso.*
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith


@RunWith(AndroidJUnit4::class)
class AltitudeUITest {

@get:Rule
var activityRule = ActivityScenarioRule(AltitudeActivity::class.java)

@Test
fun testValueUpdateWithZero(){
activityRule.scenario.onActivity { it.updateAltitude(0.0) }
onView(withId(R.id.altitude)).check(matches(withText("0.00 m")))
}

@Test
fun testValueUpdateWithPositiveNumber(){
activityRule.scenario.onActivity { it.updateAltitude(122.0) }
onView(withId(R.id.altitude)).check(matches(withText("122.00 m")))
}

@Test
fun testValueUpdateWithNegativeNumber(){
activityRule.scenario.onActivity { it.updateAltitude(-12.43) }
onView(withId(R.id.altitude)).check(matches(withText("-12.43 m")))
}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.team28.thehiker

import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers.*
import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.After
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith


import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class FindMeInstrumentedTest {

@get:Rule
var activityRule: ActivityScenarioRule<MainActivity> = ActivityScenarioRule<MainActivity>(MainActivity::class.java)

@Test
fun return_from_findMe() {
onView(withId(R.id.btn_position_on_map)).perform(click())
onView(withId(R.id.mapView)).check(matches(isDisplayed()))
Espresso.pressBack()
onView(withId(R.id.btn_altitude)).check(matches(isClickable()))
}

@Test
fun all_views_visible() {
onView(withId(R.id.btn_position_on_map)).perform(click())
onView(withId(R.id.mapView)).check(matches(isDisplayed()))
onView(withId(R.id.my_location_string)).check(matches(isDisplayed()))
onView(withId(R.id.map_pic)).check(matches(isDisplayed()))
}
}
Loading

0 comments on commit 1030334

Please sign in to comment.