Skip to content

Commit

Permalink
camera crop fixed, multiple results done
Browse files Browse the repository at this point in the history
  • Loading branch information
dipeshkoirala21 committed Sep 27, 2021
1 parent 623cc01 commit a9459d2
Show file tree
Hide file tree
Showing 32 changed files with 74 additions and 57 deletions.
4 changes: 2 additions & 2 deletions android/app/_BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ android_library(

android_build_config(
name = "build_config",
package = "com.rn_isac",
package = "com.isacsimo",
)

android_resource(
name = "res",
package = "com.rn_isac",
package = "com.isacsimo",
res = "src/main/res",
)

Expand Down
28 changes: 19 additions & 9 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
def enableProguardInReleaseBuilds = true

/**
* The preferred build flavor of JavaScriptCore.
Expand Down Expand Up @@ -134,12 +134,12 @@ android {
}

defaultConfig {
applicationId "com.rn_isac"
applicationId "com.isacsimo"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionCode 2
missingDimensionStrategy 'react-native-camera', 'general'
versionName "1.0"
versionName "1.0.2"
renderscriptTargetApi rootProject.ext.renderscriptVersion
renderscriptSupportModeEnabled true
vectorDrawables.useSupportLibrary = true
Expand All @@ -154,20 +154,30 @@ android {
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.rn_isac;
package com.isacsimo;

import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rn_isac">
package="com.isacsimo">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.rn_isac;
package com.isacsimo;

import com.facebook.react.ReactActivity;

Expand All @@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
*/
@Override
protected String getMainComponentName() {
return "rn_isac";
return "isacsimo";
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.rn_isac;
package com.isacsimo;

import com.rn_isac.generated.BasePackageList;
import com.isacsimo.generated.BasePackageList;
import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
Expand Down Expand Up @@ -70,7 +70,7 @@ private static void initializeFlipper(
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("com.rn_isac.ReactNativeFlipper");
Class<?> aClass = Class.forName("com.isacsimo.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.rn_isac.generated;
package com.isacsimo.generated;

import java.util.Arrays;
import java.util.List;
Expand Down
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_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-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_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.
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.
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
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_round.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

buildscript {
ext {
buildToolsVersion = "29.0.3"
buildToolsVersion = "30.0.0"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
compileSdkVersion = 30
targetSdkVersion = 30
renderscriptVersion = 21
supportLibVersion = "29.0.3"
supportLibVersion = "30.0.0"
ndkVersion = "20.1.5948944"
}
repositories {
Expand Down
5 changes: 5 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ FLIPPER_VERSION=0.75.1

org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m

MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=Bu1ldCh@nge
MYAPP_UPLOAD_KEY_PASSWORD=Bu1ldCh@nge
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'rn_isac'
rootProject.name = 'isacsimo'
include ':react-native-geolocation-service'
project(':react-native-geolocation-service').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-geolocation-service/android')
include ':react-native-get-location'
Expand Down
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "rn_isac",
"displayName": "rn_isac"
}
"name": "isacsimo",
"displayName": "isacsimo"
}
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ

platform :ios, '10.0'

target 'rn_isac' do
target 'isacsimo' do
config = use_native_modules!

use_react_native!(:path => config[:reactNativePath],
Expand All @@ -20,7 +20,7 @@ target 'rn_isac' do

pod 'react-native-geolocation-service', :path => '../node_modules/react-native-geolocation-service'

target 'rn_isacTests' do
target 'isacsimoTests' do
inherit! :complete
# Pods for testing
end
Expand Down
24 changes: 12 additions & 12 deletions ios/rn_isac.xcodeproj/xcshareddata/xcschemes/rn_isac.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "rn_isac.app"
BlueprintName = "rn_isac"
ReferencedContainer = "container:rn_isac.xcodeproj">
BuildableName = "isacsimo.app"
BlueprintName = "isacsimo"
ReferencedContainer = "container:isacsimo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -33,9 +33,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
BuildableName = "rn_isacTests.xctest"
BlueprintName = "rn_isacTests"
ReferencedContainer = "container:rn_isac.xcodeproj">
BuildableName = "isacsimoTests.xctest"
BlueprintName = "isacsimoTests"
ReferencedContainer = "container:isacsimo.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
Expand All @@ -55,9 +55,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "rn_isac.app"
BlueprintName = "rn_isac"
ReferencedContainer = "container:rn_isac.xcodeproj">
BuildableName = "isacsimo.app"
BlueprintName = "isacsimo"
ReferencedContainer = "container:isacsimo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
Expand All @@ -72,9 +72,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "rn_isac.app"
BlueprintName = "rn_isac"
ReferencedContainer = "container:rn_isac.xcodeproj">
BuildableName = "isacsimo.app"
BlueprintName = "isacsimo"
ReferencedContainer = "container:isacsimo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down
2 changes: 1 addition & 1 deletion ios/rn_isac/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(

RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"rn_isac"
moduleName:@"isacsimo"
initialProperties:nil];

if (@available(iOS 13.0, *)) {
Expand Down
2 changes: 1 addition & 1 deletion ios/rn_isac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>rn_isac</string>
<string>isacsimo</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/rn_isac/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="rn_isac" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="isacsimo" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="GJd-Yh-RWb">
<rect key="frame" x="0.0" y="202" width="375" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
Expand Down
4 changes: 2 additions & 2 deletions ios/rn_isacTests/rn_isacTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#define TIMEOUT_SECONDS 600
#define TEXT_TO_LOOK_FOR @"Welcome to React"

@interface rn_isacTests : XCTestCase
@interface isacsimoTests : XCTestCase

@end

@implementation rn_isacTests
@implementation isacsimoTests

- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rn_isac",
"name": "isacsimo",
"version": "0.0.1",
"private": true,
"scripts": {
Expand Down
12 changes: 7 additions & 5 deletions src/global/components/add/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AddButton extends Component {
modalVisible: false,
switchValue: false,
};
setModalVisible = (visible) => {
setModalVisible = visible => {
this.setState({modalVisible: visible});
};
onAdd = () => {
Expand All @@ -33,7 +33,7 @@ class AddButton extends Component {
this.setState({modalVisible: false});
}
};
toggleSwitch = (value) => {
toggleSwitch = value => {
//onValueChange of the switch this function will be called
this.setState({switchValue: value});
//state changes according to switch
Expand All @@ -44,6 +44,7 @@ class AddButton extends Component {
return (
<>
<TouchableOpacity
activeOpacity={0.9}
style={{height: 80, width: 80, bottom: -25}}
onPress={switchValue ? this.onAdd : () => this.setModalVisible(true)}>
<View
Expand All @@ -55,6 +56,7 @@ class AddButton extends Component {
justifyContent: 'center',
}}>
<TouchableOpacity
activeOpacity={0.9}
style={{flex: 1}}
// onPress={this.onAdd}
onPress={
Expand Down Expand Up @@ -128,7 +130,7 @@ class AddButton extends Component {
<View
style={{
flexDirection: 'row',
justifyContent: 'space-evenly',
// justifyContent: 'space-evenly',
marginHorizontal: 20,
marginTop: 20,
}}>
Expand All @@ -142,7 +144,7 @@ class AddButton extends Component {
<Text
style={{
fontWeight: '900',
fontSize: 16,
fontSize: 14,
color: '#4A4A4A',
alignSelf: 'center',
left: 20,
Expand All @@ -168,7 +170,7 @@ class AddButton extends Component {
<Text
style={{
fontWeight: '900',
fontSize: 16,
fontSize: 14,
color: '#4A4A4A',
alignSelf: 'center',
left: 20,
Expand Down
4 changes: 2 additions & 2 deletions src/screens/result/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class index extends Component {
fontWeight: 'bold',
}}>
{' '}
{each.score * 100}%{' '}
{Math.round(each.score) * 100}%{' '}
</Text>
</View>
<View style={{flexWrap: 'wrap', top: 20}}>
Expand Down Expand Up @@ -230,7 +230,7 @@ class index extends Component {
<Text style={styles.bodyText}> Score: </Text>
<Text style={styles.bodyText}>
{' '}
{each.score * 100}%{' '}
{Math.round(each.score) * 100}%{' '}
</Text>
</>
)}
Expand Down
6 changes: 3 additions & 3 deletions src/screens/user-profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class Profile extends Component {
};
getCurrentLocation = async () => {
Geolocation.getCurrentPosition(
(position) => {
position => {
let lat = position.coords.latitude;
let lng = position.coords.longitude;

this.props.userProfileGet({lat, lng});
},
(error) => alert(JSON.stringify(error)),
error => alert(JSON.stringify(error)),
{
accuracy: {android: 'high'},
forceRequestLocation: true,
Expand Down Expand Up @@ -172,7 +172,7 @@ class Profile extends Component {
)}
<View style={{bottom: 40, position: 'absolute', flexDirection: 'row'}}>
<Text style={{fontSize: 12, color: '#4A4A4A'}}>AppVersion : </Text>
<Text style={{fontSize: 12, color: '#4A4A4A'}}>1.0.0 </Text>
<Text style={{fontSize: 12, color: '#4A4A4A'}}>1.0.2 </Text>
</View>
</View>
);
Expand Down

0 comments on commit a9459d2

Please sign in to comment.