tapjoy-react-native-sdk 14.3.1 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +3 -3
- package/android/gradle.properties +3 -3
- package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeView.kt +2 -2
- package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkModule.kt +57 -13
- package/example/Gemfile +9 -1
- package/example/android/app/build.gradle +3 -3
- package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt +2 -8
- package/example/android/build.gradle +5 -5
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/example/android/gradle.properties +5 -0
- package/example/android/gradlew +2 -3
- package/example/babel.config.js +0 -9
- package/example/ios/AppDelegate.swift +55 -0
- package/example/ios/Podfile +0 -1
- package/example/ios/TapjoyReactNativeSdkExample/Info.plist +1 -1
- package/example/ios/TapjoyReactNativeSdkExample.xcodeproj/project.pbxproj +5 -62
- package/example/metro.config.js +10 -16
- package/example/package.json +20 -19
- package/example/src/App.tsx +1 -2
- package/example/src/MainScreen.tsx +107 -58
- package/example/src/OfferwallDiscoverScreen.tsx +105 -91
- package/example/src/OfferwallScreen.tsx +170 -156
- package/example/src/Styles.ts +3 -2
- package/example/src/UserProperties.tsx +150 -135
- package/ios/TapjoyReactNativeSdk.m +4 -1
- package/ios/TapjoyReactNativeSdk.swift +14 -6
- package/lib/commonjs/TJLoggingLevel.js +8 -0
- package/lib/commonjs/TJVersion.js +1 -1
- package/lib/commonjs/Tapjoy.js +41 -1
- package/lib/commonjs/TapjoyEvent.js +1 -1
- package/lib/commonjs/index.js +2 -1
- package/lib/typescript/TJLoggingLevel.d.ts +7 -0
- package/lib/typescript/Tapjoy.d.ts +31 -0
- package/lib/typescript/TapjoyEvent.d.ts +1 -1
- package/lib/typescript/index.d.ts +4 -1
- package/package.json +8 -15
- package/src/TJLoggingLevel.ts +8 -0
- package/src/TJStatus.ts +1 -1
- package/src/TJVersion.ts +1 -1
- package/src/Tapjoy.ts +46 -3
- package/src/TapjoyEvent.ts +2 -2
- package/src/index.ts +4 -0
- package/tapjoy-react-native-sdk.podspec +1 -1
- package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.h +0 -6
- package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.mm +0 -31
- package/example/ios/TapjoyReactNativeSdkExample/main.m +0 -10
- package/example/ios/TapjoyReactNativeSdkExampleTests/Info.plist +0 -24
- package/example/ios/TapjoyReactNativeSdkExampleTests/TapjoyReactNativeSdkExampleTests.m +0 -66
- package/example/package-lock.json +0 -8605
package/example/src/App.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
3
3
|
import { NavigationContainer } from '@react-navigation/native';
|
|
4
4
|
import { Dimensions } from 'react-native';
|
|
@@ -20,7 +20,6 @@ export default function App() {
|
|
|
20
20
|
<ConnectContext.Provider value={{ isSdkConnected, setIsSdkConnected }}>
|
|
21
21
|
<Tab.Navigator
|
|
22
22
|
screenOptions={{
|
|
23
|
-
scrollEnabled: true,
|
|
24
23
|
tabBarLabelPosition: 'beside-icon',
|
|
25
24
|
tabBarLabelStyle: styles.tabBarLabelStyle,
|
|
26
25
|
tabBarIconStyle: styles.tabBarIconStyle,
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React, { useState, useEffect, useContext } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
|
-
SafeAreaView,
|
|
5
4
|
TextInput,
|
|
6
5
|
Platform,
|
|
7
6
|
Text,
|
|
8
7
|
ScrollView,
|
|
9
8
|
} from 'react-native';
|
|
9
|
+
import {
|
|
10
|
+
SafeAreaProvider,
|
|
11
|
+
useSafeAreaInsets,
|
|
12
|
+
} from 'react-native-safe-area-context';
|
|
10
13
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
11
14
|
import {
|
|
12
15
|
getTrackingStatus,
|
|
@@ -14,8 +17,9 @@ import {
|
|
|
14
17
|
} from 'react-native-tracking-transparency';
|
|
15
18
|
import styles from './Styles';
|
|
16
19
|
import Button from './Button';
|
|
17
|
-
import Tapjoy, { TJVersion, TapjoyEvent } from 'tapjoy-react-native-sdk';
|
|
20
|
+
import Tapjoy, { TJVersion, TapjoyEvent, TJLoggingLevel } from 'tapjoy-react-native-sdk';
|
|
18
21
|
import { ConnectContext } from './ConnectContext';
|
|
22
|
+
import SelectionMenu from './SelectionMenu';
|
|
19
23
|
|
|
20
24
|
const MainScreen: React.FC = () => {
|
|
21
25
|
const [sdkKey, setSdkKey] = useState<string>('');
|
|
@@ -23,7 +27,15 @@ const MainScreen: React.FC = () => {
|
|
|
23
27
|
const [curerncySpendAwardAmount, setCurrencySpendAwardAmount] = useState<string>('10');
|
|
24
28
|
const [statusLabelText, setStatusLabelText] = useState('Status Message');
|
|
25
29
|
const { isSdkConnected, setIsSdkConnected } = useContext(ConnectContext);
|
|
26
|
-
|
|
30
|
+
const [selectedLoggingLevel, setSelectedLoggingLevel] = useState<TJLoggingLevel>(
|
|
31
|
+
TJLoggingLevel.Error
|
|
32
|
+
);
|
|
33
|
+
const loggingLevelData = [
|
|
34
|
+
{ value: TJLoggingLevel.Error, label: 'Error' },
|
|
35
|
+
{ value: TJLoggingLevel.Warning, label: 'Warning' },
|
|
36
|
+
{ value: TJLoggingLevel.Info, label: 'Info' },
|
|
37
|
+
{ value: TJLoggingLevel.Debug, label: 'Debug' },
|
|
38
|
+
];
|
|
27
39
|
useEffect(() => {
|
|
28
40
|
retrieveSdkKey().then();
|
|
29
41
|
}, []);
|
|
@@ -50,9 +62,13 @@ const MainScreen: React.FC = () => {
|
|
|
50
62
|
setIsConnecting(true);
|
|
51
63
|
await AsyncStorage.setItem('sdkKey', sdkKey);
|
|
52
64
|
|
|
53
|
-
Tapjoy.
|
|
54
|
-
|
|
55
|
-
//
|
|
65
|
+
Tapjoy.setLoggingLevel(selectedLoggingLevel);
|
|
66
|
+
|
|
67
|
+
// Use the following code to set the user id and logging level using connect flags
|
|
68
|
+
// let flags: object = {
|
|
69
|
+
// TJC_OPTION_USER_ID: "userId",
|
|
70
|
+
// TJC_OPTION_LOGGING_LEVEL: TJLoggingLevel.Debug
|
|
71
|
+
// };
|
|
56
72
|
let flags: object = {};
|
|
57
73
|
let trackingStatus = await getTrackingStatus();
|
|
58
74
|
if (trackingStatus !== 'authorized' && trackingStatus !== 'unavailable') {
|
|
@@ -60,15 +76,17 @@ const MainScreen: React.FC = () => {
|
|
|
60
76
|
}
|
|
61
77
|
|
|
62
78
|
await Tapjoy.connect(sdkKey, flags, (event: TapjoyEvent) => {
|
|
63
|
-
|
|
64
|
-
|
|
79
|
+
setStatusLabelText(`Tapjoy SDK connected with Warning: ErrorCode: ${event.code} ${event.message} `);
|
|
80
|
+
},
|
|
65
81
|
);
|
|
66
82
|
setIsConnecting(false);
|
|
83
|
+
setSelectedLoggingLevel(await Tapjoy.getLoggingLevel());
|
|
84
|
+
Tapjoy.setCustomParameter("my_parameter");
|
|
67
85
|
setStatusLabelText(
|
|
68
86
|
'Tapjoy SDK Connected' +
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
87
|
+
(Object.keys(flags).length > 0
|
|
88
|
+
? `\nFlags: ${JSON.stringify(flags)}`
|
|
89
|
+
: '')
|
|
72
90
|
);
|
|
73
91
|
setIsSdkConnected(true);
|
|
74
92
|
} catch (error: any) {
|
|
@@ -92,9 +110,9 @@ const MainScreen: React.FC = () => {
|
|
|
92
110
|
let result = await Tapjoy.getCurrencyBalance();
|
|
93
111
|
setStatusLabelText(
|
|
94
112
|
'getCurrencyBalance returned ' +
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
113
|
+
result.currencyName +
|
|
114
|
+
': ' +
|
|
115
|
+
result.amount
|
|
98
116
|
);
|
|
99
117
|
} catch (error: any) {
|
|
100
118
|
setStatusLabelText(error.toString());
|
|
@@ -130,59 +148,90 @@ const MainScreen: React.FC = () => {
|
|
|
130
148
|
setCurrencySpendAwardAmount(numericText);
|
|
131
149
|
};
|
|
132
150
|
|
|
151
|
+
const handleLoggingLevelChange = async (item: { value: TJLoggingLevel }) => {
|
|
152
|
+
setSelectedLoggingLevel(item.value);
|
|
153
|
+
const originalLoggingLevel = await Tapjoy.getLoggingLevel();
|
|
154
|
+
await Tapjoy.setLoggingLevel(item.value);
|
|
155
|
+
if (await Tapjoy.getLoggingLevel() !== item.value) {
|
|
156
|
+
setSelectedLoggingLevel(originalLoggingLevel); // Revert to the original value if logging level is locked
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
161
|
+
|
|
133
162
|
return (
|
|
134
|
-
<
|
|
135
|
-
<
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
style={[styles.zeroFlex, styles.leftSpacing]}
|
|
150
|
-
onPress={handleConnect}
|
|
151
|
-
disabled={isConnecting || Tapjoy.isConnected()}
|
|
152
|
-
/>
|
|
153
|
-
</View>
|
|
154
|
-
<View style={styles.currencyOuterContainer}>
|
|
155
|
-
<Text style={styles.labelText}>{'Managed Currency:'}</Text>
|
|
163
|
+
<SafeAreaProvider>
|
|
164
|
+
<View style={[
|
|
165
|
+
styles.mainContainer,
|
|
166
|
+
{
|
|
167
|
+
paddingTop: safeAreaInsets.top,
|
|
168
|
+
paddingBottom: safeAreaInsets.bottom,
|
|
169
|
+
paddingLeft: safeAreaInsets.left,
|
|
170
|
+
paddingRight: safeAreaInsets.right,
|
|
171
|
+
},
|
|
172
|
+
]}>
|
|
173
|
+
<ScrollView>
|
|
174
|
+
<View style={styles.container}>
|
|
175
|
+
<View style={styles.lineGap}>
|
|
176
|
+
<Text style={styles.statusText}>{statusLabelText}</Text>
|
|
177
|
+
</View>
|
|
156
178
|
<View style={styles.inputContainer}>
|
|
157
|
-
<Text style={styles.userPropertiesLabel}>Amount:</Text>
|
|
158
179
|
<TextInput
|
|
159
180
|
style={styles.textInput}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
placeholder="Managed Currency value"
|
|
164
|
-
/>
|
|
165
|
-
</View>
|
|
166
|
-
<View style={styles.currencyInnerContainer}>
|
|
167
|
-
<Button
|
|
168
|
-
style={styles.buttonGap}
|
|
169
|
-
title="Get"
|
|
170
|
-
onPress={getCurrencyBalance}
|
|
181
|
+
value={sdkKey}
|
|
182
|
+
onChangeText={setSdkKey}
|
|
183
|
+
placeholder="Enter SDK Key"
|
|
171
184
|
/>
|
|
172
185
|
<Button
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
onPress={
|
|
186
|
+
title="Connect"
|
|
187
|
+
style={[styles.zeroFlex, styles.leftSpacing]}
|
|
188
|
+
onPress={handleConnect}
|
|
189
|
+
disabled={isConnecting || Tapjoy.isConnected()}
|
|
176
190
|
/>
|
|
177
|
-
|
|
191
|
+
</View>
|
|
192
|
+
<View style={styles.currencyOuterContainer}>
|
|
193
|
+
<Text style={styles.labelText}>{'Managed Currency:'}</Text>
|
|
194
|
+
<View style={styles.inputContainer}>
|
|
195
|
+
<Text style={styles.userPropertiesLabel}>Amount:</Text>
|
|
196
|
+
<TextInput
|
|
197
|
+
style={styles.textInput}
|
|
198
|
+
keyboardType='numeric'
|
|
199
|
+
value={curerncySpendAwardAmount}
|
|
200
|
+
onChangeText={handleAmountChange}
|
|
201
|
+
placeholder="Managed Currency value"
|
|
202
|
+
/>
|
|
203
|
+
</View>
|
|
204
|
+
<View style={styles.currencyInnerContainer}>
|
|
205
|
+
<Button
|
|
206
|
+
style={styles.buttonGap}
|
|
207
|
+
title="Get"
|
|
208
|
+
onPress={getCurrencyBalance}
|
|
209
|
+
/>
|
|
210
|
+
<Button
|
|
211
|
+
style={styles.buttonGap}
|
|
212
|
+
title="Spend"
|
|
213
|
+
onPress={spendCurrency}
|
|
214
|
+
/>
|
|
215
|
+
<Button title="Award" onPress={awardCurrency} />
|
|
216
|
+
</View>
|
|
217
|
+
<View style={styles.selectionContainer}>
|
|
218
|
+
<View style={styles.horizontalContainer}>
|
|
219
|
+
<Text style={styles.userPropertiesLabel}>Logging Level:</Text>
|
|
220
|
+
<SelectionMenu
|
|
221
|
+
data={loggingLevelData}
|
|
222
|
+
onSelectItem={handleLoggingLevelChange}
|
|
223
|
+
initialSelectedItem={loggingLevelData[selectedLoggingLevel]}
|
|
224
|
+
/>
|
|
225
|
+
</View>
|
|
226
|
+
</View>
|
|
178
227
|
</View>
|
|
179
228
|
</View>
|
|
180
|
-
</
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</
|
|
185
|
-
</
|
|
229
|
+
</ScrollView>
|
|
230
|
+
<Text style={styles.versionText}>
|
|
231
|
+
Version: {TJVersion.getPluginVersion()}
|
|
232
|
+
</Text>
|
|
233
|
+
</View>
|
|
234
|
+
</SafeAreaProvider>
|
|
186
235
|
);
|
|
187
236
|
};
|
|
188
237
|
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState, useContext } from 'react';
|
|
2
|
-
import { useFocusEffect } from '@react-navigation/native';
|
|
3
2
|
import {
|
|
4
3
|
FlatList,
|
|
5
|
-
SafeAreaView,
|
|
6
4
|
ScrollView,
|
|
7
5
|
Text,
|
|
8
6
|
TextInput,
|
|
9
7
|
View,
|
|
10
8
|
Dimensions,
|
|
11
9
|
} from 'react-native';
|
|
12
|
-
import
|
|
10
|
+
import {
|
|
11
|
+
SafeAreaProvider,
|
|
12
|
+
useSafeAreaInsets,
|
|
13
|
+
} from 'react-native-safe-area-context';
|
|
14
|
+
import { TJOfferwallDiscoverView } from 'tapjoy-react-native-sdk';
|
|
13
15
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
14
16
|
import dayjs from 'dayjs';
|
|
15
17
|
import Button from './Button';
|
|
@@ -88,100 +90,112 @@ const OfferwallDiscoverScreen: React.FC = () => {
|
|
|
88
90
|
};
|
|
89
91
|
};
|
|
90
92
|
|
|
93
|
+
const safeAreaInsets = useSafeAreaInsets();
|
|
94
|
+
|
|
91
95
|
return (
|
|
92
|
-
<
|
|
93
|
-
<
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
96
|
+
<SafeAreaProvider>
|
|
97
|
+
<View style={[
|
|
98
|
+
styles.mainContainer,
|
|
99
|
+
{
|
|
100
|
+
paddingTop: safeAreaInsets.top,
|
|
101
|
+
paddingBottom: safeAreaInsets.bottom,
|
|
102
|
+
paddingLeft: safeAreaInsets.left,
|
|
103
|
+
paddingRight: safeAreaInsets.right,
|
|
104
|
+
},
|
|
105
|
+
]}>
|
|
106
|
+
<ScrollView style={styles.offerwallScrollContainer}>
|
|
107
|
+
<View style={styles.container}>
|
|
108
|
+
<View style={styles.inputContainer}>
|
|
109
|
+
<Text style={styles.textInputLabel}>Width</Text>
|
|
110
|
+
<TextInput
|
|
111
|
+
keyboardType="numeric"
|
|
112
|
+
style={styles.textInput}
|
|
113
|
+
onChangeText={(value) => {
|
|
114
|
+
value = stripNonNumericValue(value);
|
|
115
|
+
setWidth(value);
|
|
116
|
+
widthChangedManually.current = true;
|
|
117
|
+
}}
|
|
118
|
+
value={width}
|
|
119
|
+
autoCorrect={false}
|
|
120
|
+
placeholderTextColor="#888"
|
|
121
|
+
autoCapitalize="none"
|
|
122
|
+
/>
|
|
123
|
+
<Text style={[styles.textInputLabel, styles.leftSpacing]}>
|
|
124
|
+
Height
|
|
125
|
+
</Text>
|
|
126
|
+
<TextInput
|
|
127
|
+
keyboardType="numeric"
|
|
128
|
+
style={styles.textInput}
|
|
129
|
+
onChangeText={(value) => {
|
|
130
|
+
value = stripNonNumericValue(value);
|
|
131
|
+
setHeight(value);
|
|
132
|
+
}}
|
|
133
|
+
value={height.replace(/\D/g, '')}
|
|
134
|
+
autoCorrect={false}
|
|
135
|
+
placeholderTextColor="#888"
|
|
136
|
+
autoCapitalize="none"
|
|
137
|
+
/>
|
|
138
|
+
</View>
|
|
139
|
+
<View style={styles.inputContainer}>
|
|
140
|
+
<TextInput
|
|
141
|
+
style={styles.textInput}
|
|
142
|
+
value={offerwallPlacementName}
|
|
143
|
+
onChangeText={setOfferwallPlacementName}
|
|
144
|
+
autoCorrect={false}
|
|
145
|
+
placeholder="Enter Placement Name"
|
|
146
|
+
placeholderTextColor="#888"
|
|
147
|
+
autoCapitalize="none"
|
|
148
|
+
/>
|
|
149
|
+
<Button
|
|
150
|
+
style={styles.clearButton}
|
|
151
|
+
onPress={handleClearInput}
|
|
152
|
+
title={'\u2573'}
|
|
153
|
+
/>
|
|
154
|
+
</View>
|
|
155
|
+
<View style={styles.buttonContainer}>
|
|
156
|
+
<Button
|
|
157
|
+
onPress={loadContent}
|
|
158
|
+
disabled={!isSdkConnected}
|
|
159
|
+
title={'Request'}
|
|
160
|
+
/>
|
|
161
|
+
<View style={styles.buttonGap} />
|
|
162
|
+
<Button onPress={clearContent} title={'Clear'} />
|
|
163
|
+
</View>
|
|
164
|
+
<TJOfferwallDiscoverView
|
|
165
|
+
ref={owdRef}
|
|
166
|
+
style={getViewStyle()}
|
|
167
|
+
onRequestSuccess={(event: any) => {
|
|
168
|
+
addLogItem(event.nativeEvent.result);
|
|
119
169
|
}}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
170
|
+
onRequestFailure={(event: any) =>
|
|
171
|
+
addLogItem(
|
|
172
|
+
`requestFailure: code:${event.nativeEvent.errorCode}, message:${event.nativeEvent.errorMessage}`
|
|
173
|
+
)
|
|
174
|
+
}
|
|
175
|
+
onContentReady={(event: any) =>
|
|
176
|
+
addLogItem(event.nativeEvent.result)
|
|
177
|
+
}
|
|
178
|
+
onContentError={(event: any) =>
|
|
179
|
+
addLogItem(
|
|
180
|
+
`contentError: code:${event.nativeEvent.errorCode}, message:${event.nativeEvent.errorMessage}`
|
|
181
|
+
)
|
|
182
|
+
}
|
|
124
183
|
/>
|
|
125
184
|
</View>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<Button
|
|
137
|
-
style={styles.clearButton}
|
|
138
|
-
onPress={handleClearInput}
|
|
139
|
-
title={'\u2573'}
|
|
140
|
-
/>
|
|
141
|
-
</View>
|
|
142
|
-
<View style={styles.buttonContainer}>
|
|
143
|
-
<Button
|
|
144
|
-
onPress={loadContent}
|
|
145
|
-
disabled={!isSdkConnected}
|
|
146
|
-
title={'Request'}
|
|
147
|
-
/>
|
|
148
|
-
<View style={styles.buttonGap} />
|
|
149
|
-
<Button onPress={clearContent} title={'Clear'} />
|
|
150
|
-
</View>
|
|
151
|
-
<TJOfferwallDiscoverView
|
|
152
|
-
ref={owdRef}
|
|
153
|
-
style={getViewStyle()}
|
|
154
|
-
onRequestSuccess={(event: any) => {
|
|
155
|
-
addLogItem(event.nativeEvent.result);
|
|
156
|
-
}}
|
|
157
|
-
onRequestFailure={(event: any) =>
|
|
158
|
-
addLogItem(
|
|
159
|
-
`requestFailure: code:${event.nativeEvent.errorCode}, message:${event.nativeEvent.errorMessage}`
|
|
160
|
-
)
|
|
161
|
-
}
|
|
162
|
-
onContentReady={(event: any) =>
|
|
163
|
-
addLogItem(event.nativeEvent.result)
|
|
164
|
-
}
|
|
165
|
-
onContentError={(event: any) =>
|
|
166
|
-
addLogItem(
|
|
167
|
-
`contentError: code:${event.nativeEvent.errorCode}, message:${event.nativeEvent.errorMessage}`
|
|
168
|
-
)
|
|
169
|
-
}
|
|
185
|
+
</ScrollView>
|
|
186
|
+
<View style={styles.owLogContainer}>
|
|
187
|
+
<FlatList
|
|
188
|
+
data={logData}
|
|
189
|
+
renderItem={({ item }) => (
|
|
190
|
+
<View>
|
|
191
|
+
<Text style={styles.logText}>{item}</Text>
|
|
192
|
+
</View>
|
|
193
|
+
)}
|
|
194
|
+
keyExtractor={(_item, index) => index.toString()}
|
|
170
195
|
/>
|
|
171
|
-
</
|
|
172
|
-
</ScrollView>
|
|
173
|
-
<View style={styles.owLogContainer}>
|
|
174
|
-
<FlatList
|
|
175
|
-
data={logData}
|
|
176
|
-
renderItem={({ item }) => (
|
|
177
|
-
<View>
|
|
178
|
-
<Text style={styles.logText}>{item}</Text>
|
|
179
|
-
</View>
|
|
180
|
-
)}
|
|
181
|
-
keyExtractor={(_item, index) => index.toString()}
|
|
182
|
-
/>
|
|
196
|
+
</View>
|
|
183
197
|
</View>
|
|
184
|
-
</
|
|
198
|
+
</SafeAreaProvider>
|
|
185
199
|
);
|
|
186
200
|
};
|
|
187
201
|
|