Browse Source

update android SDK

feature/upgrade_sdk
dslak 2 years ago
parent
commit
2ffb69548d
  1. 17
      TIPS
  2. 4
      vds-app/App/components/Button.js
  3. 4
      vds-app/App/components/ExamQuestions.js
  4. 29
      vds-app/App/index.js
  5. 11
      vds-app/App/screens/Banner.js
  6. 11
      vds-app/App/screens/Dictionary.js
  7. 8
      vds-app/App/screens/Exam.js
  8. 5
      vds-app/App/screens/Info.js
  9. 13
      vds-app/App/screens/Quiz.js
  10. 7
      vds-app/App/screens/QuizIndex.js
  11. 16
      vds-app/App/screens/Recap.js
  12. 14
      vds-app/App/screens/RecapTrueFalse.js
  13. 10
      vds-app/App/screens/Results.js
  14. 5
      vds-app/App/screens/ResultsTrueFalse.js
  15. 8
      vds-app/App/screens/Setup.js
  16. 17
      vds-app/App/screens/Splash.js
  17. 11
      vds-app/App/screens/TrueFalse.js
  18. 17
      vds-app/app.json
  19. 37
      vds-app/package.json
  20. 8286
      vds-app/yarn-error.log

17
TIPS

@ -8,3 +8,20 @@ expo build:android --type app-bundle
expo fetch:android:keystore
export ANDROID_HOME=${HOME}/Android/Sdk
export PATH=${ANDROID_HOME}/tools:${PATH}
export PATH=${ANDROID_HOME}/emulator:${PATH}
export PATH=${ANDROID_HOME}/platform-tools:${PATH}
export ANDROID_HOME=/home/dslak/Android/Sdk
export PATH=${ANDROID_HOME}/tools:${PATH}
export PATH=${ANDROID_HOME}/emulator:${PATH}
export PATH=${ANDROID_HOME}/platform-tools:${PATH}

4
vds-app/App/components/Button.js

@ -9,7 +9,7 @@ const styles = StyleSheet.create({
backgroundColor: colors.white_alpha,
borderWidth: 4,
borderColor: 'transparent',
borderRadius: 10,
borderRadius: 5,
//paddingHorizontal: 20,
paddingVertical: 15,
alignItems: "center",
@ -42,7 +42,7 @@ const styles = StyleSheet.create({
marginTop: 20,
justifyContent: "space-between",
overflow: "hidden",
borderRadius: 10
borderRadius: 5
},
buttonBg: {
flex: 1,

4
vds-app/App/components/ExamQuestions.js

@ -1,5 +1,5 @@
import React from "react"
import { AsyncStorage } from "react-native"
import AsyncStorage from '@react-native-community/async-storage'
import aerodynamicsQuestions from "../data/aerodynamics"
import firstAidQuestions from "../data/firstAid"
@ -51,7 +51,7 @@ const generateQuestions = () => {
}
})
}).done()
})/*.then( (res) => {})*/
}

29
vds-app/App/index.js

@ -1,5 +1,6 @@
import 'react-native-gesture-handler'
import { createStackNavigator, createAppContainer } from "react-navigation"
import { createAppContainer } from "react-navigation"
import { createStackNavigator } from "react-navigation-stack"
import Splash from "./screens/Splash"
import Banner from "./screens/Banner"
@ -20,67 +21,67 @@ const MainStack = createStackNavigator({
Splash: {
screen: Splash,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
RecapTrueFalse: {
screen: RecapTrueFalse,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Recap: {
screen: Recap,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Results: {
screen: Results,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
ResultsTrueFalse: {
screen: ResultsTrueFalse,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Info: {
screen: Info,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Dictionary: {
screen: Dictionary,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Banner: {
screen: Banner,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
QuizIndex: {
screen: QuizIndex,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Quiz: {
screen: Quiz,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
TrueFalse: {
screen: TrueFalse,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
// headerTitle: navigation.getParam("title"),
// headerTintColor: colors.white,
// headerStyle: {
@ -92,13 +93,13 @@ const MainStack = createStackNavigator({
Exam: {
screen: Exam,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
},
Setup: {
screen: Setup,
navigationOptions: ({ navigation }) => ({
header: null
headerShown: false
})
}
})

11
vds-app/App/screens/Banner.js

@ -1,6 +1,6 @@
import React from "react"
import { View, StyleSheet, StatusBar, Text, Dimensions } from "react-native"
import { AdMobBanner, AdMobInterstitial, PublisherBanner, AdMobRewarded } from "expo-ads-admob"
//import { AdMobBanner, AdMobInterstitial, PublisherBanner, AdMobRewarded } from "expo-ads-admob"
import { colors, texts, credentials } from "../components/Variables"
@ -44,13 +44,8 @@ class Banner extends React.Component {
render() {
return (
<View style={styles.container} >
<AdMobBanner
style={styles.banner}
bannerSize="mediumRectangle"
adUnitID={credentials.adMobUnitID}
onDidFailToReceiveAdWithError={this.bannerError} />
<View style={styles.container}>
<Text>BANNER</Text>
</View>
)
}

11
vds-app/App/screens/Dictionary.js

@ -1,6 +1,7 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, ImageBackground, BackHandler, Linking} from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, ImageBackground, BackHandler, Linking} from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
// import { AdMobBanner } from "expo-ads-admob"
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, credentials} from "../components/Variables"
@ -233,11 +234,7 @@ class Dictionary extends React.Component {
</View>
<View style={styles.bannerContainer}>
<AdMobBanner
style={styles.banner}
bannerSize="largeBanner"
adUnitID={credentials.adMobUnitIDFooter}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
</View>
</SafeAreaView>
</View>

8
vds-app/App/screens/Exam.js

@ -1,5 +1,7 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, ImageBackground, BackHandler, AsyncStorage } from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, ImageBackground, BackHandler } from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme } from "../components/Variables"
@ -56,7 +58,7 @@ const styles = StyleSheet.create({
paddingVertical: 10,
marginTop: 30,
backgroundColor: colors.white_alpha,
borderRadius: 25,
borderRadius: 10,
textShadowColor: 'rgba(0, 0, 0, 0.45)',
textShadowOffset: {width: -1, height: 1},
textShadowRadius: 2
@ -126,7 +128,7 @@ class Exam extends React.Component {
return true
}).done()
})//.done()
}
showResults = () => {

5
vds-app/App/screens/Info.js

@ -1,5 +1,6 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler, Linking} from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, BackHandler, Linking} from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme, resultsScheme} from "../components/Variables"
@ -65,7 +66,7 @@ const styles = StyleSheet.create({
textSmall: {
lineHeight: 23,
marginTop: 15,
borderRadius: 20,
borderRadius: 10,
backgroundColor: colors.white_alpha,
borderWidth: 0,
borderColor: colors.white_alpha,

13
vds-app/App/screens/Quiz.js

@ -1,6 +1,9 @@
import React from "react"
import { View, ScrollView, Picker, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, ImageBackground, BackHandler, AsyncStorage } from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, ImageBackground, BackHandler } from "react-native"
import { Picker } from '@react-native-picker/picker'
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
// import { AdMobBanner } from "expo-ads-admob"
import { Button, ButtonContainer } from "../components/Button"
import { texts, colors, credentials } from "../components/Variables"
@ -266,11 +269,7 @@ class Quiz extends React.Component {
</View>
<View style={styles.bannerContainer}>
<AdMobBanner
style={styles.banner}
bannerSize="largeBanner"
adUnitID={credentials.adMobUnitIDFooter}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
</View>
</ImageBackground>
)

7
vds-app/App/screens/QuizIndex.js

@ -1,5 +1,6 @@
import React from "react"
import { View, ScrollView, StatusBar, BackHandler, StyleSheet, Dimensions, ImageBackground, AsyncStorage } from "react-native"
import { View, ScrollView, StatusBar, BackHandler, StyleSheet, Dimensions, ImageBackground } from "react-native"
import AsyncStorage from '@react-native-community/async-storage'
import aerodynamicsQuestions from "../data/aerodynamics"
import firstAidQuestions from "../data/firstAid"
@ -53,7 +54,7 @@ class QuizIndex extends React.Component {
storeWrongAnswers: JSON.parse(value)
}
})
}).done()
})//.done()
AsyncStorage.getItem('setupData').then((value) => {
this.setState( (state) => {
@ -62,7 +63,7 @@ class QuizIndex extends React.Component {
excludeDelta: JSON.parse(value).excludeDelta
}
})
}).done()
})//.done()
}
componentWillUnmount() {

16
vds-app/App/screens/Recap.js

@ -1,6 +1,8 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler, AsyncStorage} from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, ImageBackground, BackHandler} from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
// import { AdMobBanner } from "expo-ads-admob"
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme, credentials } from "../components/Variables"
@ -118,7 +120,7 @@ class Recap extends React.Component {
storeWrongAnswers: JSON.parse(value)
}
})
}).done()
})//.done()
}
componentWillUnmount() {
@ -148,7 +150,7 @@ class Recap extends React.Component {
return true
}).done()
})//.done()
}
render() {
@ -195,11 +197,7 @@ class Recap extends React.Component {
</SafeAreaView>
<View style={styles.bannerContainer}>
<AdMobBanner
style={styles.banner}
bannerSize="largeBanner"
adUnitID={credentials.adMobUnitIDFooter}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
</View>
</ScrollView>

14
vds-app/App/screens/RecapTrueFalse.js

@ -1,6 +1,8 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler, AsyncStorage} from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, ImageBackground, BackHandler } from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
// import { AdMobBanner } from "expo-ads-admob"
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme, credentials } from "../components/Variables"
@ -109,7 +111,7 @@ class RecapTrueFalse extends React.Component {
BackHandler.addEventListener('hardwareBackPress', this.handleBackButton)
AsyncStorage.getItem('storeWrongAnswers').then((value) => {
//console.log(value)
}).done()
})//.done()
}
componentWillUnmount() {
@ -189,11 +191,7 @@ class RecapTrueFalse extends React.Component {
</SafeAreaView>
<View style={styles.bannerContainer}>
<AdMobBanner
style={styles.banner}
bannerSize="largeBanner"
adUnitID={credentials.adMobUnitIDFooter}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
</View>
</ScrollView>

10
vds-app/App/screens/Results.js

@ -1,5 +1,7 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler, AsyncStorage} from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, BackHandler} from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme } from "../components/Variables"
@ -58,7 +60,7 @@ const styles = StyleSheet.create({
marginBottom: 20,
marginHorizontal: 20,
width: screen.width-80,
borderRadius: 20,
borderRadius: 10,
borderBottomEndRadius: 80,
borderTopStartRadius: 100,
backgroundColor: colors.white_alpha,
@ -139,7 +141,7 @@ class Results extends React.Component {
}
})
}).done()
})//.done()
}
componentWillUnmount() {
@ -168,7 +170,7 @@ class Results extends React.Component {
return true
}).done()
})//.done()
}

5
vds-app/App/screens/ResultsTrueFalse.js

@ -1,5 +1,6 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler} from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, BackHandler} from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme } from "../components/Variables"
@ -58,7 +59,7 @@ const styles = StyleSheet.create({
marginBottom: 20,
marginHorizontal: 20,
width: screen.width-80,
borderRadius: 20,
borderRadius: 10,
borderBottomEndRadius: 80,
borderTopStartRadius: 100,
backgroundColor: colors.white_alpha,

8
vds-app/App/screens/Setup.js

@ -1,5 +1,7 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, CheckBox, Switch, SafeAreaView, Dimensions, Image, ImageBackground, BackHandler, AsyncStorage} from "react-native"
import { View, ScrollView, StyleSheet, StatusBar, Text, CheckBox, Switch, Dimensions, Image, ImageBackground, BackHandler } from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
import AsyncStorage from '@react-native-community/async-storage'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, examScheme, resultsScheme} from "../components/Variables"
@ -176,7 +178,7 @@ class Setup extends React.Component {
setupData: setupData
}
})
}).done()
})//.done()
}
@ -205,7 +207,7 @@ class Setup extends React.Component {
return true
}).done()
})//.done()
}

17
vds-app/App/screens/Splash.js

@ -1,6 +1,9 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, Alert, BackHandler, AsyncStorage } from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, Image, Alert, BackHandler } from "react-native"
import AsyncStorage from '@react-native-community/async-storage'
import SafeAreaView from 'react-native-safe-area-view'
//import { AdMobBanner } from "expo-ads-admob"
//import mobileAds from 'react-native-google-mobile-ads'
import { Button, ButtonContainer } from "../components/Button"
import { colors, texts, credentials } from "../components/Variables"
@ -108,8 +111,8 @@ class Splash extends React.Component {
setupData: setup ? JSON.parse(setup) : {}
}
})
}).done()
}).done()
})//.done()
})//.done()
}
@ -279,11 +282,7 @@ class Splash extends React.Component {
</SafeAreaView>
<View style={[styles.bannerContainer, !this.state.bannerExpanded ? styles.bannerCollapsed : {}]}>
<AdMobBanner
style={styles.banner}
bannerSize="mediumRectangle"
adUnitID={credentials.adMobUnitID}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
{
this.state.bannerExpanded ? (

11
vds-app/App/screens/TrueFalse.js

@ -1,6 +1,7 @@
import React from "react"
import { View, ScrollView, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, ImageBackground, BackHandler } from "react-native"
import { AdMobBanner } from "expo-ads-admob"
import { View, ScrollView, StyleSheet, StatusBar, Text, Dimensions, ImageBackground, BackHandler } from "react-native"
import SafeAreaView from 'react-native-safe-area-view'
// import { AdMobBanner } from "expo-ads-admob"
import { Button, ButtonContainer } from "../components/Button"
import { texts, colors, examScheme, credentials } from "../components/Variables"
@ -256,11 +257,7 @@ class Quiz extends React.Component {
</View>
</View>
<View style={styles.bannerContainer}>
<AdMobBanner
style={styles.banner}
bannerSize="largeBanner"
adUnitID={credentials.adMobUnitIDFooter}
onDidFailToReceiveAdWithError={this.bannerError} />
<Text>BANNER</Text>
</View>
</ImageBackground>
)

17
vds-app/app.json

@ -5,9 +5,10 @@
"privacy": "public",
"platforms": [
"ios",
"android"
"android",
"web"
],
"version": "3.6.4",
"version": "3.7.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@ -25,17 +26,19 @@
"icon": "./assets/icon.png",
"package": "com.dslak.vdsquiz",
"permissions": [],
"versionCode": 21,
"config": {
"googleMobileAdsAppId": "ca-app-pub-4145771316565790~1876877627"
}
"versionCode": 22
},
"ios": {
"icon": "./assets/iconIOS.png",
"bundleIdentifier": "com.dslak.vdsquiz",
"supportsTablet": true
},
"entryPoint": "node_modules/expo/AppEntry.js"
"web": {
"favicon": "./assets/favicon.png"
}
},
"react-native-google-mobile-ads": {
"android_app_id": "ca-app-pub-4145771316565790~1876877627"
},
"displayName": "VDS Quiz",
"name": "VDS Quiz"

37
vds-app/package.json

@ -1,8 +1,11 @@
{
"name": "vds-quiz",
"version": "3.7.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"web": "expo start --web",
"build-android": "expo build:android -t app-bundle",
"build-ios": "expo build:ios",
"ios": "expo start --ios",
@ -10,23 +13,29 @@
"lint": "eslint ."
},
"dependencies": {
"expo": "^38.0.0",
"expo-ads-admob": "~8.2.1",
"expo-permissions": "~9.0.1",
"react": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-admob": "^1.3.2",
"react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
"react-navigation": "^3.6.1",
"@expo/config-plugins": "^6.0.1",
"@react-native-community/async-storage": "^1.12.1",
"@react-native-picker/picker": "^2.4.9",
"expo": "^48.0.8",
"expo-permissions": "^14.1.1",
"react": "^18.2.0",
"react-native": "0.71.3",
"react-native-gesture-handler": "^2.9.0",
"react-native-google-mobile-ads": "^10.0.0",
"react-native-reanimated": "~2.14.4",
"react-native-safe-area-context": "^4.5.0",
"react-native-safe-area-view": "^1.1.1",
"react-native-screens": "^3.20.0",
"react-navigation": "^4.4.4",
"react-navigation-stack": "^2.10.4",
"remove-console-logs": "^0.1.0"
},
"devDependencies": {
"babel-preset-expo": "^8.2.3",
"eslint": "^5.16.0",
"eslint-config-handlebarlabs": "^0.0.3",
"prettier": "^1.16.4"
"@babel/core": "^7.20.0",
"babel-preset-expo": "^9.3.0",
"eslint": "^8.36.0",
"eslint-config-handlebarlabs": "^0.0.6",
"prettier": "^2.8.6"
},
"private": true
}

8286
vds-app/yarn-error.log

File diff suppressed because it is too large
Loading…
Cancel
Save