Skip to content

Commit

Permalink
Merge pull request #3 from trilha-arvores/fix_endpoint
Browse files Browse the repository at this point in the history
Fix endpoint 
happy!!!
worked well
  • Loading branch information
vitorfrois authored Jun 24, 2024
2 parents 0dc7c01 + 4c6f614 commit d5b0c3f
Show file tree
Hide file tree
Showing 44 changed files with 6,446 additions and 10,279 deletions.
37 changes: 35 additions & 2 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,69 @@ import TrilhasScreen from './src/screens/TrilhasScreen'

const Stack = createNativeStackNavigator();

const config = {
animation: 'spring',
config: {
stiffness: 1000,
damping: 500,
mass: 3,
overshootClamping: true,
restDisplacementThreshold: 0.01,
restSpeedThreshold: 0.01,
},
};

export default function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Home"
component={HomeScreen}
options={{ title: 'Início' }}
options={{ title: 'Início', headerShown: false }}
/>
<Stack.Screen
name="Trilhas"
component={TrilhasScreen}
options={{ headerTitleAlign: 'center' }}
/>
<Stack.Screen
name="Iniciar"
component={IniciarScreen}
options={({ route }) => ({
title: route.params.item.name,
headerTitleAlign: 'center'
})
}
/>
<Stack.Screen
name="Atividade"
component={AtividadeScreen}
options={({ route }) => ({
title: route.params.item.name,
headerTitleAlign: 'center'
})
}
/>
<Stack.Screen
name="Final"
component={FinalScreen}
options={({ route }) => ({
title: route.params.item.name,
headerTitleAlign: 'center'
})
}
/>
<Stack.Screen
name="Escanear"
component={ScanScreen}
options={({ route }) => ({
title: `${route.params.tree.name}: ${route.params.tree.id}`,
headerTitleAlign: 'center'
})
}
/>

</Stack.Navigator>
</NavigationContainer>
);
Expand Down
1 change: 1 addition & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ android {
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.0"
missingDimensionStrategy 'react-native-camera', 'general'
}
signingConfigs {
debug {
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Expand All @@ -25,6 +26,7 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="trilha.android"/>
<data android:scheme="exp+app"/>
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
Expand Down
2 changes: 2 additions & 0 deletions android/app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<resources>
<color name="colorPrimary">#023c69</color>
<color name="colorPrimaryDark">#ffffff</color>
<color name="splashscreen_background">#ffffff</color>

</resources>
2 changes: 2 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,5 @@ EX_DEV_CLIENT_NETWORK_INSPECTOR=true

# Use legacy packaging to compress native libraries in the resulting APK.
expo.useLegacyPackaging=false

VisionCamera_enableCodeScanner=true
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
24 changes: 22 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,30 @@
"slug": "app",
"version": "1.0.0",
"android": {
"package": "trilha.android"
"package": "trilha.android",
"permissions": [
"android.permission.CAMERA"
]
},
"ios": {
"bundleIdentifier": "trilha.ios"
"bundleIdentifier": "trilha.ios",
"infoPlist": {
"NSCameraUsageDescription": "Allow $(PRODUCT_NAME) to access your camera"
}
},
"plugins": [
[
"react-native-vision-camera",
{
"enableCodeScanner": true,
"cameraPermissionText": "$(PRODUCT_NAME) needs access to your Camera."
}
]
],
"extra": {
"eas": {
"projectId": "0e8b7150-9526-4e8e-b212-32b017bc2d12"
}
}
},
"name": "app"
Expand Down
18 changes: 18 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"cli": {
"version": ">= 10.0.2"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
11 changes: 8 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { registerRootComponent } from 'expo';

import App from './App';
import { AppRegistry, Platform } from "react-native";
import App from "./App";
import { name as appName } from "./app.json";

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in Expo Go or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
if (Platform.OS == "android") {
registerRootComponent(App);
} else {
AppRegistry.registerComponent(appName, () => App);
}
10 changes: 10 additions & 0 deletions ios/app/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
<string>trilha.ios</string>
</array>
</dict>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>exp+app</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
Expand All @@ -42,6 +48,10 @@
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Camera.</string>
<key>NSMotionUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to access your device motion</string>
<key>UILaunchStoryboardName</key>
<string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Loading

0 comments on commit d5b0c3f

Please sign in to comment.