Skip to content

Commit

Permalink
audio messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tbenr committed Jul 23, 2020
1 parent f8af5a5 commit 19b3547
Show file tree
Hide file tree
Showing 40 changed files with 992 additions and 42 deletions.
2 changes: 2 additions & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />

<uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-permission android:name="com.android.vending.BILLING" />

<!-- these permissions should be removed -->
Expand Down
4 changes: 4 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ abstract_target 'Status' do
pod 'SQLCipher', '~>3.0'
pod 'SSZipArchive'

permissions_path = '../node_modules/react-native-permissions/ios'
pod 'Permission-Microphone', :path => "#{permissions_path}/Microphone.podspec"
pod 'Permission-Camera', :path => "#{permissions_path}/Camera.podspec"

target 'StatusIm' do
target 'StatusImTests' do
inherit! :complete
Expand Down
49 changes: 39 additions & 10 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ PODS:
- OpenSSL-Universal (1.0.2.19):
- OpenSSL-Universal/Static (= 1.0.2.19)
- OpenSSL-Universal/Static (1.0.2.19)
- Permission-Camera (2.1.5):
- RNPermissions
- Permission-Microphone (2.1.5):
- RNPermissions
- RCTRequired (0.62.2)
- RCTTypeSafety (0.62.2):
- FBLazyVector (= 0.62.2)
Expand Down Expand Up @@ -255,6 +259,8 @@ PODS:
- React
- react-native-shake (3.4.0):
- React
- react-native-slider (3.0.0):
- React
- react-native-splash-screen (3.2.0):
- React
- react-native-webview (10.3.1):
Expand Down Expand Up @@ -318,6 +324,8 @@ PODS:
- React-cxxreact (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/callinvoker (= 0.62.2)
- ReactNativeAudioToolkit (2.0.3):
- React
- ReactNativeDarkMode (0.2.2):
- React
- RNCClipboard (1.2.2):
Expand All @@ -341,6 +349,8 @@ PODS:
- React
- RNLanguages (3.0.2):
- React
- RNPermissions (2.1.5):
- React
- RNReactNativeHapticFeedback (1.9.0):
- React
- RNReanimated (1.8.0):
Expand All @@ -354,8 +364,8 @@ PODS:
- SQLCipher/common (3.4.2)
- SQLCipher/standard (3.4.2):
- SQLCipher/common
- SSZipArchive (2.2.2)
- TOCropViewController (2.5.2)
- SSZipArchive (2.2.3)
- TOCropViewController (2.5.3)
- TouchID (4.4.1):
- React
- Yoga (1.14.0)
Expand Down Expand Up @@ -387,6 +397,8 @@ DEPENDENCIES:
- FlipperKit/SKIOSNetworkPlugin (~> 0.37.0)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- Permission-Camera (from `../node_modules/react-native-permissions/ios/Camera.podspec`)
- Permission-Microphone (from `../node_modules/react-native-permissions/ios/Microphone.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
- RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
- React (from `../node_modules/react-native/`)
Expand All @@ -406,6 +418,7 @@ DEPENDENCIES:
- "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)"
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- react-native-shake (from `../node_modules/react-native-shake`)
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
- react-native-splash-screen (from `../node_modules/react-native-splash-screen`)
- react-native-webview (from `../node_modules/react-native-webview`)
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
Expand All @@ -419,6 +432,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "ReactNativeAudioToolkit (from `../node_modules/@react-native-community/audio-toolkit`)"
- ReactNativeDarkMode (from `../node_modules/react-native-dark-mode`)
- "RNCClipboard (from `../node_modules/@react-native-community/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
Expand All @@ -427,6 +441,7 @@ DEPENDENCIES:
- RNImageCropPicker (from `../node_modules/react-native-image-crop-picker`)
- RNKeychain (from `../node_modules/react-native-keychain`)
- RNLanguages (from `../node_modules/react-native-languages`)
- RNPermissions (from `../node_modules/react-native-permissions`)
- RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`)
- RNReanimated (from `../node_modules/react-native-reanimated`)
- RNScreens (from `../node_modules/react-native-screens`)
Expand All @@ -437,11 +452,8 @@ DEPENDENCIES:
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
- boost-for-react-native
- SQLCipher
- SSZipArchive
trunk:
- boost-for-react-native
- CocoaAsyncSocket
- CocoaLibEvent
- Flipper
Expand All @@ -452,6 +464,8 @@ SPEC REPOS:
- Flipper-RSocket
- FlipperKit
- OpenSSL-Universal
- SQLCipher
- SSZipArchive
- TOCropViewController
- YogaKit

Expand All @@ -466,6 +480,10 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
Permission-Camera:
:path: "../node_modules/react-native-permissions/ios/Camera.podspec"
Permission-Microphone:
:path: "../node_modules/react-native-permissions/ios/Microphone.podspec"
RCTRequired:
:path: "../node_modules/react-native/Libraries/RCTRequired"
RCTTypeSafety:
Expand Down Expand Up @@ -500,6 +518,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-safe-area-context"
react-native-shake:
:path: "../node_modules/react-native-shake"
react-native-slider:
:path: "../node_modules/@react-native-community/slider"
react-native-splash-screen:
:path: "../node_modules/react-native-splash-screen"
react-native-webview:
Expand All @@ -524,6 +544,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/Vibration"
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
ReactNativeAudioToolkit:
:path: "../node_modules/@react-native-community/audio-toolkit"
ReactNativeDarkMode:
:path: "../node_modules/react-native-dark-mode"
RNCClipboard:
Expand All @@ -540,6 +562,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-keychain"
RNLanguages:
:path: "../node_modules/react-native-languages"
RNPermissions:
:path: "../node_modules/react-native-permissions"
RNReactNativeHapticFeedback:
:path: "../node_modules/react-native-haptic-feedback"
RNReanimated:
Expand Down Expand Up @@ -568,8 +592,10 @@ SPEC CHECKSUMS:
Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7
FlipperKit: afd4259ef9eadeeb2d30250b37d95cb3b6b97a69
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
glog: 682164e7ac67e41afd8f7b6a37a96d04caf61cc0
OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355
Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b
Permission-Microphone: 0ffabc3fe1c75cfb260525ee3f529383c9f4368c
RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3
Expand All @@ -587,6 +613,7 @@ SPEC CHECKSUMS:
react-native-netinfo: ddaca8bbb9e6e914b1a23787ccb879bc642931c9
react-native-safe-area-context: 60f654e00b6cc416573f6d5dbfce3839958eb57a
react-native-shake: de052eaa3eadc4a326b8ddd7ac80c06e8d84528c
react-native-slider: 12bd76d3d568c9c5500825db54123d44b48e4ad4
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
react-native-webview: 40bbeb6d011226f34cb83f845aeb0fdf515cfc5f
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
Expand All @@ -599,6 +626,7 @@ SPEC CHECKSUMS:
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
ReactNativeDarkMode: 0178ffca3b10f6a7c9f49d6f9810232b328fa949
RNCClipboard: 8148e21ac347c51fd6cd4b683389094c216bb543
RNCMaskedView: 71fc32d971f03b7f03d6ab6b86b730c4ee64f5b6
Expand All @@ -607,17 +635,18 @@ SPEC CHECKSUMS:
RNImageCropPicker: 38865ab4af1b0b2146ad66061196bc0184946855
RNKeychain: 216f37338fcb9e5c3a2530f1e3295f737a690cb1
RNLanguages: 962e562af0d34ab1958d89bcfdb64fafc37c513e
RNPermissions: ad71dd4f767ec254f2cd57592fbee02afee75467
RNReactNativeHapticFeedback: 2566b468cc8d0e7bb2f84b23adc0f4614594d071
RNReanimated: 955cf4068714003d2f1a6e2bae3fb1118f359aff
RNScreens: ac02d0e4529f08ced69f5580d416f968a6ec3a1d
RNSVG: 8ba35cbeb385a52fd960fd28db9d7d18b4c2974f
SQLCipher: f9fcf29b2e59ced7defc2a2bdd0ebe79b40d4990
SSZipArchive: fa16b8cc4cdeceb698e5e5d9f67e9558532fbf23
TOCropViewController: e9da34f484aedd4e5d5a8ab230ba217cfe16c729
SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9
TOCropViewController: 20a14b6a7a098308bf369e7c8d700dc983a974e6
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: 3ebccbdd559724312790e7742142d062476b698e
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: f66349c5bfb9c21ac968307ea5a2d6c2dd4091ed
PODFILE CHECKSUM: 5faa578ff5cb7a30abc18b9d620df288750a72fe

COCOAPODS: 1.9.1
2 changes: 2 additions & 0 deletions ios/StatusIm/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<string>Location access is required for some DApps to function properly.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photos access is required to give you the ability to send images.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for sending audio messages.</string>
<key>UIAppFonts</key>
<array>
<string>Inter-Bold.otf</string>
Expand Down
2 changes: 2 additions & 0 deletions ios/StatusImPR/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
<string>Location access is required for some DApps to function properly.</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Photos access is required to give you the ability to send images.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Need microphone access for sending audio messages.</string>
<key>UIAppFonts</key>
<array>
<string>Inter-Bold.otf</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1318,5 +1318,33 @@ public void run() {

StatusThreadPoolExecutor.getInstance().execute(r);
}

@ReactMethod
public void activateKeepAwake() {
final Activity activity = getCurrentActivity();

if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
});
}
}

@ReactMethod
public void deactivateKeepAwake() {
final Activity activity = getCurrentActivity();

if (activity != null) {
activity.runOnUiThread(new Runnable() {
@Override
public void run() {
activity.getWindow().clearFlags(android.view.WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
});
}
}
}

14 changes: 14 additions & 0 deletions modules/react-native-status/ios/RCTStatus/RCTStatus.m
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,20 @@ - (void) migrateKeystore:(NSString *)accountData
[userDefaults synchronize];
}

RCT_EXPORT_METHOD(activateKeepAwake)
{
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];
});
}

RCT_EXPORT_METHOD(deactivateKeepAwake)
{
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
});
}

//// deviceinfo

- (bool) is24Hour
Expand Down
16 changes: 8 additions & 8 deletions nix/deps/gradle/deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -5794,16 +5794,16 @@
},

{
"path": "com/google/protobuf/protobuf-java/3.12.2/protobuf-java-3.12.2",
"path": "com/google/protobuf/protobuf-java/4.0.0-rc-2/protobuf-java-4.0.0-rc-2",
"host": "https://repo.maven.apache.org/maven2",
"type": "jar",
"pom": {
"sha1": "da3bb9dce2a722503f0d3e4f3b5eea93f737ba48",
"sha256": "1ijicnm83gq33px9c5r4man0n2zw6axrxsqw0jnm1miixyjz08cv"
"sha1": "8fab0fe0746b1d370663a3db7dd483c2c4d34a6f",
"sha256": "17agfgbdfxdk304fgzk0iwsf7ggwqrwb44b3nnjc0xjdgqlxmzxb"
},
"jar": {
"sha1": "f0029524002295154c6b546d4e6bd1cfc5081874",
"sha256": "186a1lgmcfr3iml7bfxk9gnbsafyxmriqfyglvkwa85d7gwvx1dk"
"sha1": "ae590f34383d2d6fde2b3b8e2ffb668e64579099",
"sha256": "0al23s9s97sxlrrndb91cnra07fdchbcgvhcacyd6yjzysz55hiw"
}
},

Expand All @@ -5828,12 +5828,12 @@
},

{
"path": "com/google/protobuf/protobuf-parent/3.12.2/protobuf-parent-3.12.2",
"path": "com/google/protobuf/protobuf-parent/4.0.0-rc-2/protobuf-parent-4.0.0-rc-2",
"host": "https://repo.maven.apache.org/maven2",
"type": "pom",
"pom": {
"sha1": "f5b5d4cb5e6d512f2fac5d2b08e599644a53c087",
"sha256": "0md51xi5af8yi9l1dpqbmysrvlll05zpvmalag6p4f6fykwcry05"
"sha1": "c5391c7917ca1197cbbda4efc6454a87e7e7107e",
"sha256": "0bvynr52xjyd42n23ih635h2cmyillfbac0yjymhlp505f0p1lp0"
}
},

Expand Down
4 changes: 2 additions & 2 deletions nix/deps/gradle/deps.urls
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,10 @@ https://repo.maven.apache.org/maven2/com/google/jimfs/jimfs/1.1/jimfs-1.1.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java-util/3.4.0/protobuf-java-util-3.4.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.0.0/protobuf-java-3.0.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.4.0/protobuf-java-3.4.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/3.12.2/protobuf-java-3.12.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-java/4.0.0-rc-2/protobuf-java-4.0.0-rc-2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.0.0/protobuf-parent-3.0.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.4.0/protobuf-parent-3.4.0.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/3.12.2/protobuf-parent-3.12.2.pom
https://repo.maven.apache.org/maven2/com/google/protobuf/protobuf-parent/4.0.0-rc-2/protobuf-parent-4.0.0-rc-2.pom
https://repo.maven.apache.org/maven2/com/google/truth/truth-parent/1.0.1/truth-parent-1.0.1.pom
https://repo.maven.apache.org/maven2/com/google/truth/truth/1.0.1/truth-1.0.1.pom
https://repo.maven.apache.org/maven2/com/google/zxing/core/3.3.3/core-3.3.3.pom
Expand Down
3 changes: 3 additions & 0 deletions nix/deps/gradle/proj.list
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
app
react-native-background-timer
react-native-camera
react-native-community_audio-toolkit
react-native-community_cameraroll
react-native-community_clipboard
react-native-community_masked-view
react-native-community_netinfo
react-native-community_slider
react-native-config
react-native-dark-mode
react-native-dialogs
Expand All @@ -18,6 +20,7 @@ react-native-languages
react-native-mail
react-native-navigation-bar-color
react-native-nfc-manager
react-native-permissions
react-native-reanimated
react-native-safe-area-context
react-native-screens
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@
"app:android": "react-native run-android"
},
"dependencies": {
"@react-native-community/audio-toolkit": "git+https://github.com/tbenr/react-native-audio-toolkit.git#v2.0.3-status-v6",
"@react-native-community/cameraroll": "^1.6.1",
"@react-native-community/clipboard": "^1.2.2",
"@react-native-community/hooks": "^2.5.1",
"@react-native-community/masked-view": "^0.1.6",
"@react-native-community/netinfo": "^4.4.0",
"@react-native-community/slider": "^3.0.0",
"@react-navigation/bottom-tabs": "^5.7.0",
"@react-navigation/native": "^5.7.0",
"@react-navigation/stack": "^5.7.0",
Expand Down Expand Up @@ -46,6 +48,7 @@
"react-native-languages": "^3.0.2",
"react-native-mail": "git+https://github.com/status-im/react-native-mail.git#v4.0.0-status",
"react-native-navigation-bar-color": "^2.0.1",
"react-native-permissions": "^2.1.5",
"react-native-reanimated": "^1.7.0",
"react-native-redash": "^14.2.2",
"react-native-safe-area-context": "^2.0.0",
Expand Down
Binary file added resources/images/icons/pause@2x.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 added resources/images/icons/pause@3x.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 added resources/images/icons/play@2x.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 added resources/images/icons/play@3x.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 added resources/images/icons/speech@2x.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 added resources/images/icons/speech@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 19b3547

Please sign in to comment.