Skip to content

Commit

Permalink
Merge pull request #257 from origami-team/android
Browse files Browse the repository at this point in the history
Android
  • Loading branch information
felixerdy authored Nov 20, 2020
2 parents d148c33 + 7b9ddfe commit 27c475a
Show file tree
Hide file tree
Showing 151 changed files with 47 additions and 36 deletions.
4 changes: 3 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "0.20"
versionName "0.21"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down Expand Up @@ -36,6 +36,8 @@ dependencies {
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')

implementation 'com.android.support:design:23.2.1'

implementation 'com.google.android.material:material:1.0.0'
}

Expand Down
3 changes: 1 addition & 2 deletions android/app/src/main/assets/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
"webDir": "www",
"server": {
"iosScheme": "https",
"androidScheme": "https",
"url": "http://192.168.0.87:8100"
"androidScheme": "https"
},
"ios": {
"hideLogs": true
Expand Down
Binary file modified android/app/src/main/res/drawable-land-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xxxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-xxxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added android/app/src/main/res/ic_launcher-web.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Binary file added android/app/src/main/res/playstore-icon.png
2 changes: 1 addition & 1 deletion android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
<color name="ic_launcher_background">#ffffff</color>
</resources>
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 29;
CURRENT_PROJECT_VERSION = 30;
DEVELOPMENT_TEAM = 7D2772F462;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
Expand All @@ -379,7 +379,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 29;
CURRENT_PROJECT_VERSION = 30;
DEVELOPMENT_TEAM = 7D2772F462;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
Expand Down
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png
Binary file modified ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png
Binary file modified ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png
8 changes: 0 additions & 8 deletions resources/README.md

This file was deleted.

Binary file removed resources/android/icon/drawable-hdpi-icon.png
Diff not rendered.
Binary file removed resources/android/icon/drawable-ldpi-icon.png
Diff not rendered.
Binary file removed resources/android/icon/drawable-mdpi-icon.png
Diff not rendered.
Diff not rendered.
Binary file removed resources/android/icon/drawable-xhdpi-icon.png
Diff not rendered.
Binary file removed resources/android/icon/drawable-xxhdpi-icon.png
Diff not rendered.
Binary file removed resources/android/icon/drawable-xxxhdpi-icon.png
Diff not rendered.
Binary file removed resources/android/icon/mipmap-hdpi/ic_launcher.png
Diff not rendered.
Binary file removed resources/android/icon/mipmap-ldpi/ic_launcher.png
Diff not rendered.
Binary file removed resources/android/icon/mipmap-mdpi/ic_launcher.png
Diff not rendered.
Binary file removed resources/android/icon/mipmap-xhdpi/ic_launcher.png
Diff not rendered.
Binary file removed resources/android/icon/mipmap-xxhdpi/ic_launcher.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
9 changes: 0 additions & 9 deletions resources/android/xml/network_security_config.xml

This file was deleted.

Binary file removed resources/icon.jpg
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-20x20@1x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-20x20@2x-1.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-20x20@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-20x20@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-29x29@1x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-29x29@2x-1.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-29x29@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-29x29@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-40x40@1x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-40x40@2x-1.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-40x40@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-40x40@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-512@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-60x60@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-60x60@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-76x76@1x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-76x76@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/AppIcon-83.5x83.5@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-1024.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-20.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-20@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-20@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-24@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-27.5@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-29.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-29@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-29@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-40.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-40@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-40@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-44@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-50.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-50@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-60.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-60@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-60@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-72.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-72@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-76.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-76@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-83.5@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-86@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-98@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-small.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-small@2x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon-small@3x.png
Diff not rendered.
Binary file removed resources/ios/icon/icon.png
Diff not rendered.
Binary file removed resources/ios/icon/icon@2x.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-2436h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-568h@2x~iphone.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-667h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-736h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape-2436h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape-736h.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape@2x~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape@~ipadpro.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Landscape~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Portrait@2x~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Portrait@~ipadpro.png
Diff not rendered.
Binary file removed resources/ios/splash/Default-Portrait~ipad.png
Diff not rendered.
Binary file removed resources/ios/splash/Default@2x~iphone.png
Diff not rendered.
Diff not rendered.
Binary file removed resources/ios/splash/Default~iphone.png
Diff not rendered.
Binary file removed resources/splash.jpg
Diff not rendered.
2 changes: 1 addition & 1 deletion src/app/components/feedback/feedback.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ export class FeedbackComponent {
})
.subscribe((data: DeviceOrientationCompassHeading) => {
this.direction = data.magneticHeading
console.log(this.direction)
})
}

Expand Down Expand Up @@ -694,6 +693,7 @@ export class FeedbackComponent {

public remove(): void {
this.positionSubscription.unsubscribe();
this.deviceOrientationSubscription.unsubscribe();
}

public onWaypointReached() {
Expand Down
9 changes: 3 additions & 6 deletions src/app/pages/play-game/playing-game/playing-game.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,9 @@
</div>

<div *ngIf="task.answer?.type == 'MULTIPLE_CHOICE'" class="multiple-choice">
<div *ngFor="let item of task.answer.photos | keyvalue | shuffle">
<ion-thumbnail slot="start">
<img [src]=item.value class="multiple-choize-img"
(click)='onMultipleChoicePhotoSelected(item, $event)' />
</ion-thumbnail>
</div>
<ion-thumbnail slot="start" *ngFor="let item of task.answer.photos | keyvalue | shuffle">
<img [src]=item.value class="multiple-choize-img" (click)='onMultipleChoicePhotoSelected(item, $event)' />
</ion-thumbnail>
</div>


Expand Down
35 changes: 29 additions & 6 deletions src/app/pages/play-game/playing-game/playing-game.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

ion-thumbnail {
--size: 150px !important;
--size: 150px;
}

.task-control {
Expand Down Expand Up @@ -154,6 +154,10 @@ ion-thumbnail {
text-align: center;
padding: 1rem;
margin: 0;

@media (max-width: 576px) {
width: 90%;
}
}

&.correct-position {
Expand Down Expand Up @@ -188,11 +192,29 @@ ion-thumbnail {

.multiple-choice {
display: flex;
flex-wrap: wrap;
width: 100%;
justify-content: space-between;

> div > ion-thumbnail {
--size: 65px;
> ion-thumbnail {
margin-bottom: 0.5rem;

> img {
border-radius: 1rem;
}

@media screen and (max-width: 575px) {
--size: 75px !important;
flex: 0 50%;
text-align: center;

> img {
width: auto;
border: 0;
border-radius: 0.5rem;
margin: auto;
}
}

> .multiple-choize-img.selected {
outline: solid #0cd1e8 2px;
Expand Down Expand Up @@ -256,6 +278,7 @@ ion-thumbnail {
font-size: 18px;
flex: 0 0 100%;
position: relative;
width: 100%;

&.bearing {
min-height: 150px;
Expand All @@ -266,9 +289,9 @@ ion-thumbnail {
}
}

&.large {
margin-top: 50%;
}
// &.large {
// margin-top: 50%;
// }

> img {
height: 100%;
Expand Down
2 changes: 2 additions & 0 deletions src/app/pages/play-game/playing-game/playing-game.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@ export class PlayingGamePage implements OnInit, OnDestroy {
this.geolocationService.clear()
this.deviceOrientationSubscription.unsubscribe();

this.trackerService.clear();

this.rotationControl.remove();
this.viewDirectionControl.remove()
this.landmarkControl.remove()
Expand Down
5 changes: 5 additions & 0 deletions src/app/services/tracker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ export class TrackerService {
this.task = undefined;
}

clear() {
this.deviceOrientationSubscription.unsubscribe();
this.positionWatch.unsubscribe();
}

setTask(task) {
this.task = task;
this.panCounter = 0;
Expand Down

0 comments on commit 27c475a

Please sign in to comment.