Skip to content

Commit

Permalink
2022 08 18 rohan face login fix (#24)
Browse files Browse the repository at this point in the history
* Changed JDK Version from 1.8 to 11 & changed gradle version from 3.1 to 4.2.2

* Changed JDK Version from 1.8 to 11 & changed gradle version from 3.1 to 4.2.2

* Merge branch 'development' of https://github.com/RoboTutorLLC/RTFace_Login into apk_generation

� Conflicts:
�	app/build.gradle
�	app/src/main/java/com/example/iris/login1/Common.java
�	app/src/main/java/com/example/iris/login1/GalleryActivity.java
�	build.gradle
Users not loading -- fixed

* Merge branch 'development' of https://github.com/RoboTutorLLC/RTFace_Login into apk_generation

 Conflicts:
	app/build.gradle
	app/src/main/java/com/example/iris/login1/Common.java
	app/src/main/java/com/example/iris/login1/GalleryActivity.java
	build.gradle
Changed android sdk version and prevented possible bug

* Merge branch 'development' of https://github.com/RoboTutorLLC/RTFace_Login into apk_generation

 Conflicts:
	app/build.gradle
	app/src/main/java/com/example/iris/login1/Common.java
	app/src/main/java/com/example/iris/login1/GalleryActivity.java
	build.gradle
Changed Version number to 1.8.1.3 from 1.8.1.2

* Merge branch 'development' of https://github.com/RoboTutorLLC/RTFace_Login into apk_generation

 Conflicts:
	app/build.gradle
	app/src/main/java/com/example/iris/login1/Common.java
	app/src/main/java/com/example/iris/login1/GalleryActivity.java
	build.gradle
Changed Version number to 1.8.1.3 from 1.8.1.2

* Update DataHelper.java

Replace with simple nested query to order animals by popularity, breaking ties randomly.
@madeleinvillegas / @rohankulkz please test new version to see:
1. Does it crash?
2. Does it work?
3. Can more of the code be deleted?

* Reverting LANG_ENG

Co-authored-by: rohankulkz <[email protected]>
Co-authored-by: JackMostow <[email protected]>
  • Loading branch information
3 people authored Sep 15, 2022
1 parent 0b9064b commit 5694a5b
Show file tree
Hide file tree
Showing 18 changed files with 209 additions and 231 deletions.
24 changes: 0 additions & 24 deletions .github/pull_request_template.md

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ android:
components:
- tools
- android-26

- build-tools-29.0.2
- platform-tools
before_cache:
Expand All @@ -28,4 +27,3 @@ branches:
only:
- master
- development

22 changes: 10 additions & 12 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
apply plugin: 'com.android.application'

android {

compileSdkVersion 30
compileSdkVersion 31
buildToolsVersion '30.0.2'


defaultConfig {
applicationId "com.example.iris.login1"
minSdkVersion 15
targetSdkVersion 30
targetSdkVersion 22
versionCode 1

//Previous was 1.7.5.7 => 1.7.5.6

versionName "1.8.1.1"
//Bug Fix, new version is 1.8.1.2 => 1.8.1.3
versionName "1.8.1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand All @@ -39,7 +35,9 @@ android {
def FALSE = "false"

def LANGUAGE_FEATURE_ID = "LANGUAGE_FEATURE_ID"
def LANGUAGE_ENGLISH = "\"LANG_EN\""

//change back to "\"LANG_ENG\""
def LANGUAGE_ENGLISH = "\"LANG_ENG\""
def LANGUAGE_SWAHILI = "\"LANG_SW\""

debug {
Expand Down Expand Up @@ -83,9 +81,9 @@ dependencies {
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:appcompat-v7:23.4.0'
implementation 'com.android.support:appcompat-v7:23.4.0'
//compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
testImplementation 'junit:junit:4.13.2'
testImplementation 'junit:junit:4.12'

}
4 changes: 3 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.iris.login1">

<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES"/>
<uses-feature android:name="android.hardware.camera" />
Expand All @@ -18,6 +19,7 @@
android:theme="@style/AppTheme">
<activity
android:name=".GalleryActivity"
android:exported="true"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden|screenSize">
<intent-filter>
Expand Down
54 changes: 18 additions & 36 deletions app/src/main/java/com/example/iris/login1/Common.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
package com.example.iris.login1;

import android.util.Pair;
import com.example.iris.login1.DataHelper;

import java.util.HashMap;
import java.util.Map;

/**
* Created by Zero on 2016/9/16.
*
*
*/
public class Common {

// different app states






public enum STATE {
IF_YOU_SEE_YOUR_PICTURE, PLEASE_TAP_ON_YOUR_PICTURE, TO_SEE_MORE_PICTURES,
IF_YOU_DONT_FIND_YOUR_PICTURE, SLIDE_THEM_LIKE_THIS, TAP_HERE_RECORD, PLEASE_SAY_YOUR_NAME,
Expand All @@ -36,7 +27,7 @@ public enum STATE {
TO_SEE_MORE_ICONS, SLIDE_ICONS_LIKE_THIS
}

public static String[] ANIMAL_NAMES_ENG = {"bat", "bear", "bee", "buffalo", "butterfly",
public static final String[] ANIMAL_NAMES_ENG = {"bat", "bear", "bee", "buffalo", "butterfly",
"camel", "cat", "cheetah", "chicken", "chimpanzee", "cow", "crocodile", "dog", "donkey", "dove",
"duck", "eagle", "elephant", "fish", "flamingo", "fox", "frog", "giraffe", "goat", "gorilla", "hippo", "horse",
"hyena", "kangaroo", "leopard", "lion", "monkey", "mouse", "ostrich", "parrot","rabbit",
Expand All @@ -45,13 +36,25 @@ public enum STATE {
// chimp and gorilla => sokwe
// zebra and donkey => punda

public static String[] ANIMAL_NAMES_SWA = {"popo", "dubu", "nyuki", "nyati", "kipepeo",
public static final String[] ANIMAL_NAMES_SWA = {"popo", "dubu", "nyuki", "nyati", "kipepeo",
"ngamia", "paka", "duma", "kuku", "sokwe (chimpanzee)", "ng'ombe", "mamba", "mbwa", "punda (donkey)", "njiwa",
"bata", "tai", "tembo", "samaki", "korongo", "mbweha", "chura", "twiga", "mbuzi", "sokwe (gorilla)", "kiboko", "farasi",
"fisi", "kangaruu", "chui", "simba", "tumbili", "panya", "mbuni", "kasuku","sungura",
"kondoo", "nyoka", "buibui", "kuchakuro", "kobe", "mbwa mwitu", "punda (zebra)"};

public static int[] ANIMAL_PATHS = {R.drawable.bat, R.drawable.bear, R.drawable.bee, R.drawable.buffalo,

public static Map<String, String> build_conn(){
Map<String, String> ANIMALS_LINK_ENG_TO_SWA = new HashMap<String, String>();
for(int i = 0; i < ANIMAL_NAMES_ENG.length; i++){
ANIMALS_LINK_ENG_TO_SWA.put(ANIMAL_NAMES_ENG[i], ANIMAL_NAMES_SWA[i]);

}
return ANIMALS_LINK_ENG_TO_SWA;
}



public static final int[] ANIMAL_PATHS = {R.drawable.bat, R.drawable.bear, R.drawable.bee, R.drawable.buffalo,
R.drawable.butterfly, R.drawable.camel, R.drawable.cat, R.drawable.cheetah,
R.drawable.chicken, R.drawable.chimpanzee, R.drawable.cow, R.drawable.crocodile, R.drawable.dog,
R.drawable.donkey, R.drawable.dove, R.drawable.duck, R.drawable.eagle, R.drawable.elephant,
Expand All @@ -62,46 +65,25 @@ public enum STATE {
R.drawable.spider, R.drawable.squirrel, R.drawable.turtle,
R.drawable.wolf, R.drawable.zebra};

public static int[] ANIMAL_SOUNDS = {R.raw.popo, R.raw.dubu, R.raw.nyuki, R.raw.nyati, R.raw.kipepeo,
public static final int[] ANIMAL_SOUNDS = {R.raw.popo, R.raw.dubu, R.raw.nyuki, R.raw.nyati, R.raw.kipepeo,
R.raw.ngamia, R.raw.paka, R.raw.duma, R.raw.kuku, R.raw.sokwe, R.raw.ng_ombe, R.raw.mamba, R.raw.mbwa,
R.raw.punda, R.raw.njiwa, R.raw.bata, R.raw.tai, R.raw.tembo, R.raw.samaki, R.raw.korongo, R.raw.mbweha,
R.raw.chura, R.raw.twiga, R.raw.mbuzi, R.raw.sokwe, R.raw.kiboko, R.raw.farasi, R.raw.fisi, R.raw.kangaruu,
R.raw.chui, R.raw.simba, R.raw.tumbili, R.raw.panya, R.raw.mbuni, R.raw.kasuku, R.raw.sungura, R.raw.kondoo,
R.raw.nyoka, R.raw.buibui, R.raw.kuchakuro, R.raw.kobe, R.raw.mbwa_mwitu, R.raw.punda};

public static Map<String, String> ANIMALS_Link = new HashMap<String, String>() {{
for(int i = 0; i < ANIMAL_NAMES_ENG.length; i++){
put(ANIMAL_NAMES_ENG[i],ANIMAL_NAMES_SWA[i]);
}
}};



public static Map<String, Pair<Integer, Integer>> ANIMALS_ENG = new HashMap<String, Pair<Integer, Integer>>() {{
public static final Map<String, Pair<Integer, Integer>> ANIMALS_ENG = new HashMap<String, Pair<Integer, Integer>>() {{
for(int i = 0; i < ANIMAL_NAMES_ENG.length; i++){
put(ANIMAL_NAMES_ENG[i], Pair.create(ANIMAL_PATHS[i], ANIMAL_SOUNDS[i]));
}
}};

public static Map<String, Pair<Integer, Integer>> ANIMALS_SWA = new HashMap<String, Pair<Integer,Integer>>() {{
public static final Map<String, Pair<Integer, Integer>> ANIMALS_SWA = new HashMap<String, Pair<Integer,Integer>>() {{
for(int i = 0; i < ANIMAL_NAMES_SWA.length; i++){
put(ANIMAL_NAMES_SWA[i], Pair.create(ANIMAL_PATHS[i], ANIMAL_SOUNDS[i]));
}
}};


//method remaps the hashmaps to the new order.
public static void reMap(){
ANIMALS_ENG.clear();
ANIMALS_SWA.clear();
for(int i = 0; i < ANIMAL_NAMES_ENG.length; i++){
ANIMALS_ENG.put(ANIMAL_NAMES_ENG[i], Pair.create(ANIMAL_PATHS[i], ANIMAL_SOUNDS[i]));
}
for(int i = 0; i < ANIMAL_NAMES_SWA.length; i++){
ANIMALS_SWA.put(ANIMAL_NAMES_SWA[i], Pair.create(ANIMAL_PATHS[i], ANIMAL_SOUNDS[i]));
}
}

//indicate the delay time
public static final int DELAY_TO_SHOW_VIDEO_FULL_SCREEN = 7000;
public static final int DELAY_TO_SHOW_VIDEO = 5000;
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/java/com/example/iris/login1/CrashHandler.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.example.iris.login1;

import android.app.Activity;
import android.content.Context;
import android.os.Build;

import java.io.File;
Expand Down
Loading

0 comments on commit 5694a5b

Please sign in to comment.