Skip to content

Commit

Permalink
QRCode scanner is working.
Browse files Browse the repository at this point in the history
  • Loading branch information
d14na committed Aug 27, 2018
1 parent df0154e commit c5a983a
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 81 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ android {
applicationId "com.zer0net"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 180826
versionName "18.8.26"
versionCode 180827
versionName "18.8.27"
missingDimensionStrategy "RNN.reactNativeVersion", "reactNative51" // <- See note below for further instruction regarding compatibility with other React Native versions
// Available options:
// reactNative51: Support for React Native 0.51-0.54
Expand Down
110 changes: 69 additions & 41 deletions android/app/src/main/assets/index.android.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -64279,6 +64279,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
_react2.default.createElement(
_reactNative.View,
{
style: styles.header,
__source: {
fileName: _jsxFileName,
lineNumber: 60
Expand All @@ -64287,7 +64288,10 @@ __d(function (global, _require, module, exports, _dependencyMap) {
_react2.default.createElement(_reactNativeElements.Icon, {
name: "qrcode",
type: "font-awesome",
color: "#fff",
color: "rgba(134, 147, 158, 1.0)",
underlayColor: "rgba(57, 62, 66, 1.0)",
size: 32,
containerStyle: styles.btnQrCode,
onPress: this._openScanner,
__source: {
fileName: _jsxFileName,
Expand All @@ -64310,13 +64314,14 @@ __d(function (global, _require, module, exports, _dependencyMap) {
marginRight: 5
}
},
inputStyle: styles.searchInput,
containerStyle: styles.searchInput,
inputStyle: styles.searchInputText,
placeholder: "Looking for something interesting?",
onChangeText: this._handleSearchInput,
onSubmitEditing: this._handleSearchSubmit,
__source: {
fileName: _jsxFileName,
lineNumber: 67
lineNumber: 70
}
})
),
Expand All @@ -64326,7 +64331,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.contentContainer,
__source: {
fileName: _jsxFileName,
lineNumber: 77
lineNumber: 81
}
},
_react2.default.createElement(_reactNative.Image, {
Expand All @@ -64335,17 +64340,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.mainBanner,
__source: {
fileName: _jsxFileName,
lineNumber: 78
}
}),
_react2.default.createElement(_reactNativeElements.Icon, {
name: "qrcode",
type: "font-awesome",
color: "#333",
onPress: this._openScanner,
__source: {
fileName: _jsxFileName,
lineNumber: 83
lineNumber: 82
}
}),
_react2.default.createElement(_reactNativeElements.ButtonGroup, {
Expand All @@ -64357,7 +64352,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
},
__source: {
fileName: _jsxFileName,
lineNumber: 89
lineNumber: 87
}
}),
this._displayZites()
Expand Down Expand Up @@ -64429,7 +64424,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: [_constants.Styles.centerView, styles.notFound],
__source: {
fileName: _jsxFileName,
lineNumber: 152
lineNumber: 150
}
},
_react2.default.createElement(
Expand All @@ -64438,7 +64433,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.notFoundText,
__source: {
fileName: _jsxFileName,
lineNumber: 153
lineNumber: 151
}
},
"no recent zites"
Expand All @@ -64452,7 +64447,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
{
__source: {
fileName: _jsxFileName,
lineNumber: 158
lineNumber: 156
}
},
_react2.default.createElement(_reactNativeElements.Button, {
Expand All @@ -64469,7 +64464,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
title: "D14NA",
__source: {
fileName: _jsxFileName,
lineNumber: 159
lineNumber: 157
}
}),
_react2.default.createElement(_reactNativeElements.Button, {
Expand All @@ -64486,7 +64481,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
title: "ZITETAGS",
__source: {
fileName: _jsxFileName,
lineNumber: 167
lineNumber: 165
}
}),
_react2.default.createElement(_reactNativeElements.Button, {
Expand All @@ -64503,7 +64498,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
title: "USER GUIDE",
__source: {
fileName: _jsxFileName,
lineNumber: 175
lineNumber: 173
}
})
);
Expand All @@ -64516,7 +64511,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: [_constants.Styles.centerView, styles.notFound],
__source: {
fileName: _jsxFileName,
lineNumber: 186
lineNumber: 184
}
},
_react2.default.createElement(
Expand All @@ -64525,7 +64520,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.notFoundText,
__source: {
fileName: _jsxFileName,
lineNumber: 187
lineNumber: 185
}
},
"no trending zites"
Expand Down Expand Up @@ -64573,7 +64568,20 @@ __d(function (global, _require, module, exports, _dependencyMap) {
contentContainer: {
padding: 20
},
header: {
flexDirection: 'row',
backgroundColor: 'rgba(0, 0, 0, 1.0)'
},
btnQrCode: {
marginTop: 1,
marginBottom: 1,
paddingLeft: 7,
backgroundColor: 'rgba(57, 62, 66, 1.0)'
},
searchInput: {
flex: 1
},
searchInputText: {
paddingLeft: 40,
paddingBottom: _reactNative.Platform.OS === 'ios' ? 0 : 9
},
Expand Down Expand Up @@ -120272,7 +120280,9 @@ __d(function (global, _require, module, exports, _dependencyMap) {

_constants.Shared.TrackEvent('CAMERA_');

_this._btnCancel = _this._btnCancel.bind(_this);
_this.camera = null;
_this._close = _this._close.bind(_this);
_this._onBarcodeRead = _this._onBarcodeRead.bind(_this);
return _this;
}

Expand All @@ -120287,7 +120297,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.container,
__source: {
fileName: _jsxFileName,
lineNumber: 38
lineNumber: 42
}
},
_react2.default.createElement(_reactNativeCamera.RNCamera, {
Expand All @@ -120297,11 +120307,13 @@ __d(function (global, _require, module, exports, _dependencyMap) {
style: styles.preview,
type: _reactNativeCamera.RNCamera.Constants.Type.back,
flashMode: _reactNativeCamera.RNCamera.Constants.FlashMode.on,
permissionDialogTitle: 'Permission to use camera',
permissionDialogMessage: 'We need your permission to use your camera phone',
onBarCodeRead: this._onBarcodeRead,
barCodeTypes: [_reactNativeCamera.RNCamera.Constants.BarCodeType.qr],
permissionDialogTitle: 'Camera Permission Request',
permissionDialogMessage: 'We require permission to use your device\'s camera to continue.',
__source: {
fileName: _jsxFileName,
lineNumber: 39
lineNumber: 43
}
}),
_react2.default.createElement(
Expand All @@ -120314,17 +120326,17 @@ __d(function (global, _require, module, exports, _dependencyMap) {
},
__source: {
fileName: _jsxFileName,
lineNumber: 49
lineNumber: 53
}
},
_react2.default.createElement(
_reactNative.TouchableOpacity,
{
onPress: this._btnCancel,
onPress: this._close,
style: styles.close,
__source: {
fileName: _jsxFileName,
lineNumber: 50
lineNumber: 54
}
},
_react2.default.createElement(
Expand All @@ -120335,10 +120347,10 @@ __d(function (global, _require, module, exports, _dependencyMap) {
},
__source: {
fileName: _jsxFileName,
lineNumber: 53
lineNumber: 57
}
},
"CANCEL"
"CANCEL SCANNER"
)
)
)
Expand All @@ -120348,10 +120360,30 @@ __d(function (global, _require, module, exports, _dependencyMap) {
key: "componentDidMount",
value: function componentDidMount() {}
}, {
key: "_btnCancel",
value: function _btnCancel() {
key: "_close",
value: function _close() {
_reactNativeNavigation.Navigation.popToRoot('zeronet.Main').catch(console.log);
}
}, {
key: "_onBarcodeRead",
value: function _onBarcodeRead(_event) {
var data = _event.data;
var address = data;

if (address) {
this._close();

_stores2.default.Stage.initZite(address);

_reactNativeNavigation.Navigation.mergeOptions('zeronet.Stage', {
sideMenu: {
left: {
visible: true
}
}
});
}
}
}]);
return Camera;
}(_react2.default.Component)) || _class;
Expand Down Expand Up @@ -141379,11 +141411,7 @@ __d(function (global, _require, module, exports, _dependencyMap) {
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
var url = 'file:///data/user/0/com.zer0net/files/1ZTAGS56qz1zDDxW2Ky19pKzvnyqJDy6J/index.html';
console.log('***FORCE onLoadStart', url);
this._webview.source = url;
}
value: function componentDidMount() {}
}, {
key: "_getSource",
value: function _getSource() {
Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/assets/index.android.bundle.meta
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c68^K�gꣅ��`Q���
�5��dn�o�O#�1��K
14 changes: 11 additions & 3 deletions ios/zer0net/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>18.8.14</string>
<string>18.8.27</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>180814</string>
<string>180827</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand All @@ -35,12 +35,20 @@
</dict>
</dict>
</dict>
<key>NSCameraUsageDescription</key>
<string>Acces to your camera allows us to offer new features like QR Code scanning.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string/>
<string>Access to your location data allows us to offer new geo-location features.</string>
<key>NSMainNibFile</key>
<string>LaunchScreen</string>
<key>NSMainNibFile~ipad</key>
<string>LaunchScreen</string>
<key>NSMicrophoneUsageDescription</key>
<string>Access to your microphone allows us to offer new features like live chat.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Access to your photo library allows us to offer new photo &amp; video features.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Access to your photo library allows us to offer new features like advanced sharing.</string>
<key>UIAppFonts</key>
<array>
<string>SpaceMono-Regular.ttf</string>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zer0net",
"version": "18.8.26",
"version": "18.8.27",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
Expand Down

0 comments on commit c5a983a

Please sign in to comment.