Compare commits

...

52 Commits

Author SHA1 Message Date
Filipe Brito 7cd0016809 Merge branch 'new/android-migration' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-10-05 11:00:09 -03:00
Filipe Brito 2d9fc25050 Update deepLinking.js 2019-10-05 10:56:18 -03:00
Filipe Brito 16e1b0d057 Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-10-04 11:38:54 -03:00
Filipe Brito 3d5733bdc0
Merge branch 'develop' into new/android-migration 2019-10-04 10:58:04 -03:00
Filipe Brito b8075c6b46 Add play and play experimental name and code version 2019-10-03 16:32:32 -03:00
Filipe Brito 7277cea3db Update build.gradle 2019-10-03 16:13:23 -03:00
Filipe Brito bf1273db76 Update config.yml 2019-10-03 15:58:13 -03:00
Filipe Brito c84f1d5796 Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-10-03 15:40:50 -03:00
Filipe Brito 3fcf28827f Update config.yml 2019-10-01 18:14:51 -03:00
Filipe Brito fe3ef227c3 Update config.yml 2019-10-01 17:45:56 -03:00
Filipe Brito 3083ee8057 Update config.yml 2019-10-01 17:23:15 -03:00
Filipe Brito fc4d02178a Update config.yml 2019-10-01 16:59:45 -03:00
Filipe Brito b6ac1bf110 Update config.yml 2019-10-01 16:53:23 -03:00
Filipe Brito e5ed5ff582 Update config.yml 2019-10-01 16:37:45 -03:00
Filipe Brito e2468d1d17 Update config.yml 2019-10-01 16:23:22 -03:00
Filipe Brito fb4955f68a Update config.yml 2019-10-01 13:16:17 -03:00
Filipe Brito b33dcbc9ac Update config.yml 2019-10-01 13:06:43 -03:00
Filipe Brito 429e4ea523 Update config.yml 2019-10-01 13:04:28 -03:00
Filipe Brito 69a2a68ad4 Update config.yml 2019-10-01 12:58:05 -03:00
Filipe Brito 7c99ca3360 Moves google-services.json (play) to proper directory. 2019-10-01 12:28:35 -03:00
Filipe Brito 1aed6e4d13 Removes unecessary method. 2019-10-01 12:05:58 -03:00
Filipe Brito e09aac90c2 Merge develop into new/android-migration 2019-10-01 10:51:27 -03:00
Filipe Brito 486a9676dc Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-10-01 10:49:48 -03:00
Filipe Brito ebd0941078 Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-09-26 18:45:25 -03:00
Filipe Brito 7e715a5cd6 Adds experimental and play app icons and names. 2019-09-26 18:20:13 -03:00
Filipe Brito 8d06807d2b add playExperimental/google-services.prod.json 2019-09-26 16:16:22 -03:00
Filipe Brito fc862b6c40 Add correct launcher icons. 2019-09-26 16:12:57 -03:00
Filipe Brito 7ab06681a0 Update strings.xml 2019-09-26 15:06:23 -03:00
Filipe Brito af5aff6789 Add play files 2019-09-26 14:49:14 -03:00
Filipe Brito 283016085c Merge branch develop. 2019-09-26 12:02:45 -03:00
Filipe Brito 53496efa6c
Merge branch 'develop' into new/android-migration 2019-09-23 18:09:13 -03:00
Filipe Brito 329e21bb4b Format file. 2019-09-23 17:43:03 -03:00
Filipe Brito 89d46e12ef Update rn-user-defaults version. 2019-09-23 16:53:30 -03:00
Filipe Brito 5439a7bec3 Merge branch 'new/android-migration' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-09-19 19:17:14 -03:00
Filipe Brito b7a0cf8f33 Adds sharedUserId on Manifest 2019-09-19 19:05:06 -03:00
Djorkaeff Alexandre 764942c812 Try to share credentials by shareUserId 2019-09-19 15:55:23 -03:00
Filipe Brito a6eacb7a92 Update build.gradle 2019-09-19 13:23:01 -03:00
Filipe Brito d9aa9514b3 Delete org.eclipse.buildship.core.prefs 2019-09-18 11:48:34 -03:00
Filipe Brito 0fc7534db8 Removes legacy eclipse files and update .gitignore 2019-09-18 11:41:45 -03:00
Filipe Brito af6834a4ec Delete ic_reply_black_24dp.xml 2019-09-18 11:36:21 -03:00
Filipe Brito 7c22f9df82 Fix typo. 2019-09-18 11:34:51 -03:00
Filipe Brito 88e6846f66 Merge develop and fix conflicts 2019-09-18 11:05:35 -03:00
Filipe Brito 47c44233fa Add IDENTIFIER constant. 2019-08-29 17:29:06 -03:00
Filipe Brito 653f1e1bcc Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-08-29 17:28:41 -03:00
Filipe Brito 194395d900 Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-08-22 15:41:55 -03:00
Filipe Brito e3a66d92ba Use credentials.js instead of native.js 2019-08-22 14:53:57 -03:00
Filipe Brito 5be22d88d6 Do not link libraries manually. 2019-08-22 14:52:07 -03:00
Filipe Brito 56a7759326 Update yarn.lock 2019-08-22 11:48:04 -03:00
Filipe Brito 890190d0cc Update rn-user-defaults version and checks for both Android and iOS native credentials when there isn't migation for now. 2019-08-22 11:32:23 -03:00
Filipe Brito 47dc644478 Merge branch 'develop' of github.com:RocketChat/Rocket.Chat.ReactNative into new/android-migration 2019-08-21 10:34:57 -03:00
Filipe Brito ca003d835b Update sharedPreferences.js 2019-08-16 19:10:37 -03:00
Filipe Brito ed07b94a54 Add Android sharedPreferences keys. 2019-08-16 19:09:16 -03:00
54 changed files with 710 additions and 162 deletions

View File

@ -99,7 +99,79 @@ jobs:
- store_artifacts:
path: /tmp/screenshots
android-build:
android-play-build:
<<: *defaults
docker:
- image: circleci/android:api-28-node
environment:
# GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"
# GRADLE_OPTS: -Xmx2048m -Dorg.gradle.daemon=false
# JVM_OPTS: -Xmx4096m
JAVA_OPTS: '-Xms512m -Xmx2g'
GRADLE_OPTS: '-Xmx3g -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx2g -XX:+HeapDumpOnOutOfMemoryError"'
TERM: dumb
BASH_ENV: "~/.nvm/nvm.sh"
steps:
- checkout
- run:
name: Install Node 8
command: |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
source ~/.nvm/nvm.sh
# https://github.com/creationix/nvm/issues/1394
set +e
nvm install 8
echo 'export PATH="/home/circleci/.nvm/versions/node/v8.16.0/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile
- restore_cache:
name: Restore NPM cache
key: node-modules-{{ checksum "yarn.lock" }}
- run:
name: Install React Native CLI
command: |
npm i -g react-native-cli
- run:
name: Install NPM modules
command: |
yarn
- restore_cache:
name: Restore gradle cache
key: android-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
- run:
name: restore files from ENV
command: |
echo $CHAT_ROCKET_ANDROID_STORE_FILE_BASE64_JKS | base64 --decode > android/chat-rocket-android.jks
echo $ROCKET_PLAY_JSON | base64 --decode > android/app/rocket-chat.json
- run:
name: Build Play app
command:
cd android && ./gradlew bundlePlayRelease
- store_artifacts:
path: android/app/build/outputs/bundle
- save_cache:
name: Save NPM cache
key: node-modules-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- save_cache:
name: Save gradle cache
key: android-{{ checksum "android/build.gradle" }}-{{ checksum "android/app/build.gradle" }}
paths:
- ~/.gradle
android-play-experimental-build:
<<: *defaults
docker:
- image: circleci/android:api-28-node
@ -169,7 +241,7 @@ jobs:
- run:
name: Set Google Services
command: |
cp google-services.prod.json google-services.json
cp src/playExperimental/google-services.prod.json src/playExperimental/google-services.json
working_directory: android/app
- run:
@ -192,12 +264,12 @@ jobs:
echo -e "export default { BUGSNAG_API_KEY: '$BUGSNAG_KEY' };" > ./config.js
- run:
name: Build Android App
name: Build Play Experimental app
command: |
npx jetify
cd android
if [[ $KEYSTORE ]]; then
./gradlew bundleRelease
./gradlew bundlePlayExperimentalRelease
else
./gradlew assembleDebug
fi
@ -374,6 +446,10 @@ workflows:
requires:
- ios-hold-testflight
- android-build:
- android-play-build:
requires:
- lint-testunit
- android-play-experimental-build:
requires:
- lint-testunit

7
.gitignore vendored
View File

@ -30,6 +30,12 @@ build/
local.properties
*.iml
# Legacy Eclipse project files
.classpath
.project
.cproject
.settings/
# node.js
#
node_modules/
@ -42,6 +48,7 @@ coverage/
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#

View File

@ -129,22 +129,29 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility rootProject.ext.javaVersion
targetCompatibility rootProject.ext.javaVersion
}
defaultConfig {
applicationId "chat.rocket.reactnative"
applicationId "chat.rocket.android"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "1.20.0"
versionCode rootProject.ext.playCodeVersion
versionName rootProject.ext.playNameVersion
vectorDrawables.useSupportLibrary = true
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
}
signingConfigs {
release {
playRelease {
storeFile project.rootProject.file('chat-rocket-android.jks').getCanonicalFile()
storePassword System.getenv("CHAT_ROCKET_ANDROID_STORE_PASSWORD")
keyAlias System.getenv("CHAT_ROCKET_ANDROID_KEY_ALIAS")
keyPassword System.getenv("CHAT_ROCKET_ANDROID_KEY_PASSWORD")
}
playExperimentalRelease {
if (project.hasProperty('KEYSTORE')) {
storeFile file(KEYSTORE)
storePassword KEYSTORE_PASSWORD
@ -152,7 +159,49 @@ android {
keyPassword KEY_PASSWORD
}
}
debug {
storeFile project.rootProject.file('debug.keystore').getCanonicalFile()
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
flavorDimensions "store"
productFlavors {
play {
dimension "store"
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher",
appName: "@string/app_name"
]
}
playExperimental {
dimension "store"
applicationId "chat.rocket.reactnative"
versionCode rootProject.ext.playExperimentalCodeVersion
versionName rootProject.ext.playExperimentalNameVersion
manifestPlaceholders = [
appIcon: "@mipmap/ic_launcher_experimental",
appName: "@string/app_name_experimental"
]
}
}
buildTypes {
release {
productFlavors.play.signingConfig signingConfigs.playRelease
productFlavors.playExperimental.signingConfig signingConfigs.playExperimentalRelease
minifyEnabled enableProguardInReleaseBuilds
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
}
}
splits {
abi {
reset()
@ -161,13 +210,7 @@ android {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
signingConfig signingConfigs.release
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
@ -197,11 +240,13 @@ android {
dependencies {
addUnimodulesDependencies()
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation project(':watermelondb')
implementation project(':reactnativenotifications')
implementation project(":reactnativekeyboardinput")
implementation project(':@react-native-community_viewpager')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
implementation "com.google.firebase:firebase-messaging:18.0.0"
implementation "com.google.firebase:firebase-core:16.0.9"

View File

@ -2,7 +2,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:networkSecurityConfig="@xml/react_native_config"
tools:ignore="GoogleAppIndexingWarning"
tools:targetApi="28" />
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:networkSecurityConfig="@xml/react_native_config" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
</manifest>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

View File

@ -1,5 +0,0 @@
<resources>
<string name="app_name">[DEVELOP] RocketChatRN</string>
<string name="no_browser_found">No Browser Found</string>
</resources>

View File

@ -1,60 +1,78 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="chat.rocket.reactnative">
xmlns:tools="http://schemas.android.com/tools"
package="chat.rocket.android"
android:sharedUserId="chat.rocket.android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission-sdk-23 android:name="android.permission.VIBRATE"/>
<application
android:name="chat.rocket.android.MainApplication"
android:allowBackup="true"
android:icon="${appIcon}"
android:label="${appName}"
android:theme="@style/AppTheme"
tools:replace="android:label">
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="go.rocket.chat" />
<data android:scheme="rocketchat" android:host="room" />
<data android:scheme="rocketchat" android:host="auth" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:noHistory="true"
android:name=".share.ShareActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/share_extension_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="${BugsnagAPIKey}" />
</application>
<activity
android:name="chat.rocket.android.MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/app_name"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/app_name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="go.rocket.chat"
android:scheme="https" />
<data
android:host="room"
android:scheme="rocketchat" />
<data
android:host="auth"
android:scheme="rocketchat" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:name="chat.rocket.android.share.ShareActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="@string/share_extension_name"
android:noHistory="true"
android:screenOrientation="portrait"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<meta-data
android:name="com.bugsnag.android.API_KEY"
android:value="${BugsnagAPIKey}" />
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission-sdk-23 android:name="android.permission.VIBRATE" />
</manifest>

View File

@ -1,4 +1,4 @@
package chat.rocket.reactnative;
package chat.rocket.android;
import android.app.Notification;
import android.app.NotificationChannel;
@ -8,12 +8,8 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.AudioManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings.System;
import android.media.RingtoneManager;
import com.wix.reactnativenotifications.core.AppLaunchHelper;
import com.wix.reactnativenotifications.core.AppLifecycleFacade;

View File

@ -1,4 +1,4 @@
package chat.rocket.reactnative;
package chat.rocket.android;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;

View File

@ -1,19 +1,19 @@
package chat.rocket.reactnative;
package chat.rocket.android;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.content.SharedPreferences;
import androidx.annotation.Nullable;
import com.facebook.react.PackageList;
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
import com.facebook.react.bridge.JavaScriptExecutorFactory;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import chat.rocket.reactnative.generated.BasePackageList;
import chat.rocket.android.generated.BasePackageList;
import org.unimodules.adapters.react.ModuleRegistryAdapter;
import org.unimodules.adapters.react.ReactModuleRegistryProvider;

View File

@ -1,4 +1,4 @@
package chat.rocket.reactnative.generated;
package chat.rocket.android.generated;
import java.util.Arrays;
import java.util.List;

View File

@ -1,4 +1,4 @@
package chat.rocket.reactnative.share;
package chat.rocket.android.share;
import com.facebook.react.ReactActivity;
import com.facebook.react.ReactActivityDelegate;

View File

@ -1,6 +1,6 @@
package chat.rocket.reactnative.share;
package chat.rocket.android.share;
import chat.rocket.reactnative.BuildConfig;
import chat.rocket.android.BuildConfig;
import chat.rocket.SharePackage;

View File

@ -0,0 +1,102 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="247.7922"
android:viewportHeight="247.7922">
<group
android:translateX="69.8961"
android:translateY="69.8961">
<path
android:fillType="evenOdd"
android:pathData="M93.921,43.28L93.922,43.283C93.922,43.282 93.922,43.282 93.922,43.282C93.922,43.281 93.921,43.281 93.921,43.28ZM32.924,10.95C36.19,12.769 39.278,15.071 41.914,17.629C46.165,16.857 50.547,16.468 54.993,16.468C68.302,16.468 80.921,19.969 90.522,26.325C95.494,29.618 99.445,33.525 102.266,37.939C105.408,42.857 107,48.145 107,53.812C107,59.327 105.408,64.618 102.266,69.535C99.445,73.951 95.494,77.856 90.522,81.149C80.921,87.505 68.303,91.004 54.993,91.004C50.547,91.004 46.166,90.615 41.914,89.844C39.277,92.401 36.19,94.704 32.924,96.523C15.472,105.288 1,96.729 1,96.729C1,96.729 14.455,85.274 12.267,75.231C6.247,69.043 2.985,61.58 2.985,53.662C2.985,45.893 6.248,38.43 12.267,32.241C14.455,22.201 1.004,10.748 1,10.744C1.004,10.741 15.475,2.186 32.924,10.95Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="54"
android:endY="89.495674"
android:startX="54"
android:startY="-4.593772"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M22.066,71.46C16.128,66.689 12.564,60.582 12.564,53.926C12.564,38.654 31.331,26.273 54.482,26.273C77.633,26.273 96.4,38.654 96.4,53.926C96.4,69.199 77.633,81.58 54.482,81.58C48.776,81.58 43.337,80.828 38.379,79.466L34.754,83.031C32.785,84.968 30.476,86.721 28.07,88.102C24.881,89.699 21.731,90.57 18.615,90.836C18.791,90.51 18.953,90.18 19.127,89.854C22.758,83.031 23.738,76.9 22.066,71.46Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
<path
android:fillType="nonZero"
android:pathData="M35.209,53.736m-6.264,0a6.264,6.264 0,1 1,12.527 0a6.264,6.264 0,1 1,-12.527 0"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="35.2085"
android:endY="58.20792"
android:startX="35.2085"
android:startY="46.44125"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillType="nonZero"
android:pathData="M54.482,53.736m-6.264,0a6.264,6.264 0,1 1,12.527 0a6.264,6.264 0,1 1,-12.527 0"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="54.4815"
android:endY="58.20792"
android:startX="54.4815"
android:startY="46.44125"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
<path
android:fillType="nonZero"
android:pathData="M75.682,53.736m-6.264,0a6.264,6.264 0,1 1,12.527 0a6.264,6.264 0,1 1,-12.527 0"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="75.6815"
android:endY="58.20792"
android:startX="75.6815"
android:startY="46.44125"
android:type="linear">
<item
android:color="#FFDB2323"
android:offset="0" />
<item
android:color="#FFDB2323"
android:offset="1" />
</gradient>
</aapt:attr>
</path>
</group>
</vector>

View File

@ -1,5 +1,5 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:opacity="opaque">
<item android:drawable="@color/splashBackground"/>
<item android:drawable="@color/white"/>
<item>
<bitmap
android:src="@drawable/launch_screen"

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/white"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary_dark">#660B0B0B</color>
<item name="splashBackground" type="color">#FFFFFF</item>
<color name="ic_launcher_background">@color/white</color>
<item name="notification_text" type="color">#CC3333</item>
<!-- Primary colors -->
<color name="white">#FFFFFFFF</color>
</resources>

View File

@ -1,5 +1,5 @@
<resources>
<string name="app_name">Rocket.Chat Experimental</string>
<string name="share_extension_name">Rocket.Chat Experimental</string>
<string name="no_browser_found">No Browser Found</string>
<string name="app_name">Rocket.Chat</string>
<string name="app_name_experimental">Rocket.Chat Experimental</string>
<string name="share_extension_name">Rocket.Chat</string>
</resources>

View File

@ -0,0 +1,307 @@
{
"project_info": {
"project_number": "673693445664",
"firebase_url": "https://rocketchat-9e9be.firebaseio.com",
"project_id": "rocketchat-9e9be",
"storage_bucket": "rocketchat-9e9be.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:6ef4638e500ec958",
"android_client_info": {
"package_name": "RocketChat"
}
},
"oauth_client": [
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:16da2e50aff9f0c9",
"android_client_info": {
"package_name": "chat.rocket.android"
}
},
"oauth_client": [
{
"client_id": "673693445664-k0mvosdjoe5dbvqce3b377ckabb5dgu8.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android",
"certificate_hash": "33fa8582794176014a59054192e261bfad0e5273"
}
},
{
"client_id": "673693445664-hrjftksij02vqtd467ln2cubvu48ft5j.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android",
"certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.konecty.rocket.chat"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:1551054db195f705",
"android_client_info": {
"package_name": "chat.rocket.android.dev"
}
},
"oauth_client": [
{
"client_id": "673693445664-t5aeku0oie010npd40a0tgn27c418vk7.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android.dev",
"certificate_hash": "41cf750df786a6d9da712a98a629d0c8391876d6"
}
},
{
"client_id": "673693445664-iml14ln4vccuu7liclrpt2k671fkjs38.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "chat.rocket.android.dev",
"certificate_hash": "33fa8582794176014a59054192e261bfad0e5273"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.konecty.rocket.chat"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:673693445664:android:64932c99863e2838",
"android_client_info": {
"package_name": "com.konecty.rocket.chat"
}
},
"oauth_client": [
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-vtcvuvso7k88gpodlpshod55g1ehs03s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-sf7lqf11kk6vplg9ljh7pi491gvb08f3.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-fb71j3aqmafmm20jkj8gvpusv04fdnq8.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-ejd5lkbsdjoo5onc052dotsjacdh1kcc.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-3ajben08beuco6eout3kpod2gbbm8fij.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.konecty.rocket.chat",
"certificate_hash": "cd5806ba3f0141d0f2e47acfe64a485f575108ab"
}
},
{
"client_id": "673693445664-ssfpeb0are3svvg0etbttog789s0n3ua.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.konecty.rocket.chat"
}
},
{
"client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}

View File

@ -1,22 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
playNameVersion = '4.0.0'
playCodeVersion = 2081
playExperimentalNameVersion = '1.20.0'
playExperimentalCodeVersion = 2081
javaVersion = JavaVersion.VERSION_1_8
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
buildToolsVersion = "28.0.3"
supportLibVersion = "28.0.0"
glideVersion = "4.9.0"
kotlin_version = "1.3.50"
supportLibVersion = "28.0.0"
}
repositories {
mavenLocal()
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
mavenLocal()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
@ -32,39 +37,19 @@ buildscript {
allprojects {
repositories {
google()
jcenter()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
maven { url("$rootDir/../node_modules/react-native/android") }
// Android JSC is installed from npm
maven { url("$rootDir/../node_modules/jsc-android/dist") }
maven {
// We should change it when Jitsi-SDK release v2.4
url("$rootDir/../node_modules/react-native-jitsi-meet/jitsi-sdk")
// url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
}
google()
jcenter()
maven { url 'https://maven.google.com' }
maven { url "https://jitpack.io" }
}
}
// subprojects { subproject ->
// afterEvaluate {
// if ((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
// android {
// compileSdkVersion 28
// buildToolsVersion "28.0.3"
// defaultConfig {
// targetSdkVersion 28
// }
// }
// }
// }
// }

BIN
android/debug.keystore Normal file

Binary file not shown.

View File

@ -0,0 +1,11 @@
// This file hosts the constants with the values used on native apps (User Defaults on iOS and Shared Preferences on Android).
import { isIOS } from '../utils/deviceInfo';
export const IDENTIFIER = isIOS ? 'group.ios.chat.rocket' : 'rocket.chat';
export const SERVERS = isIOS ? 'kServers' : 'ACCOUNTS_KEY';
export const TOKEN = isIOS ? 'kAuthToken' : 'authToken';
export const USER_ID = isIOS ? 'kUserId' : 'userId';
export const SERVER_URL = isIOS ? 'kAuthServerURL' : 'serverUrl';
export const SERVER_NAME = isIOS ? 'kServerName' : 'serverName';
export const SERVER_ICON = isIOS ? 'kServerIconURL' : 'serverLogoUrl';
export const ANDROID_PACKAGE_CONTEXT = 'chat.rocket.android';

View File

@ -1,6 +0,0 @@
export const SERVERS = 'kServers';
export const TOKEN = 'kAuthToken';
export const USER_ID = 'kUserId';
export const SERVER_URL = 'kAuthServerURL';
export const SERVER_NAME = 'kServerName';
export const SERVER_ICON = 'kServerIconURL';

View File

@ -45,7 +45,7 @@ import { sendFileMessage, cancelUpload, isUploadActive } from './methods/sendFil
import callJitsi from './methods/callJitsi';
import { getDeviceToken } from '../notifications/push';
import { SERVERS, SERVER_URL } from '../constants/userDefaults';
import { SERVERS, SERVER_URL } from '../constants/credentials';
import { setActiveUsers } from '../actions/activeUsers';
const TOKEN_KEY = 'reactnativemeteor_usertoken';

View File

@ -10,7 +10,7 @@ import database from '../lib/database';
import RocketChat from '../lib/rocketchat';
import EventEmitter from '../utils/events';
import { appStart } from '../actions';
import { isIOS } from '../utils/deviceInfo';
import { IDENTIFIER } from '../constants/credentials';
const roomTypes = {
channel: 'c', direct: 'd', group: 'p'
@ -33,9 +33,7 @@ const handleOpen = function* handleOpen({ params }) {
return;
}
if (isIOS) {
yield RNUserDefaults.setName('group.ios.chat.rocket');
}
yield RNUserDefaults.setName(IDENTIFIER);
let { host } = params;
if (!/^(http|https)/.test(host)) {

View File

@ -14,26 +14,24 @@ import RocketChat from '../lib/rocketchat';
import log from '../utils/log';
import Navigation from '../lib/Navigation';
import {
SERVERS, SERVER_ICON, SERVER_NAME, SERVER_URL, TOKEN, USER_ID
} from '../constants/userDefaults';
import { isIOS } from '../utils/deviceInfo';
IDENTIFIER, SERVERS, SERVER_ICON, SERVER_NAME, SERVER_URL, TOKEN, USER_ID, ANDROID_PACKAGE_CONTEXT
} from '../constants/credentials';
import database from '../lib/database';
import protectedFunction from '../lib/methods/helpers/protectedFunction';
import { isAndroid } from '../utils/deviceInfo';
const restore = function* restore() {
try {
let hasMigration;
if (isIOS) {
yield RNUserDefaults.setName('group.ios.chat.rocket');
hasMigration = yield AsyncStorage.getItem('hasMigration');
}
yield RNUserDefaults.setName(IDENTIFIER);
if (isAndroid) { yield RNUserDefaults.setPackageContext(ANDROID_PACKAGE_CONTEXT); }
const hasMigration = yield AsyncStorage.getItem('hasMigration');
let { token, server } = yield all({
token: RNUserDefaults.get(RocketChat.TOKEN_KEY),
server: RNUserDefaults.get('currentServer')
});
if (!hasMigration && isIOS) {
if (!hasMigration) {
let servers = yield RNUserDefaults.objectForKey(SERVERS);
// if not have current
if (servers && servers.length !== 0 && (!token || !server)) {

View File

@ -17,7 +17,7 @@ import database from '../lib/database';
import log from '../utils/log';
import { extractHostname } from '../utils/server';
import I18n from '../i18n';
import { SERVERS, TOKEN, SERVER_URL } from '../constants/userDefaults';
import { SERVERS, TOKEN, SERVER_URL } from '../constants/credentials';
const getServerInfo = function* getServerInfo({ server, raiseError = true }) {
try {

View File

@ -8,11 +8,13 @@ import RNUserDefaults from 'rn-user-defaults';
import Navigation from './lib/ShareNavigation';
import store from './lib/createStore';
import sharedStyles from './views/Styles';
import { isNotch, isIOS } from './utils/deviceInfo';
import { isNotch } from './utils/deviceInfo';
import { defaultHeader, onNavigationStateChange } from './utils/navigation';
import RocketChat from './lib/rocketchat';
import LayoutAnimation from './utils/layoutAnimation';
import { IDENTIFIER } from './constants/credentials';
const InsideNavigator = createStackNavigator({
ShareListView: {
getScreen: () => require('./views/ShareListView').default
@ -58,9 +60,7 @@ class Root extends React.Component {
}
init = async() => {
if (isIOS) {
await RNUserDefaults.setName('group.ios.chat.rocket');
}
await RNUserDefaults.setName(IDENTIFIER);
const currentServer = await RNUserDefaults.get('currentServer');
const token = await RNUserDefaults.get(RocketChat.TOKEN_KEY);

View File

@ -93,7 +93,7 @@
"remove-markdown": "^0.3.0",
"rn-extensions-share": "^2.3.10",
"rn-fetch-blob": "^0.10.16",
"rn-user-defaults": "^1.3.5",
"rn-user-defaults": "^1.5.0",
"semver": "6.3.0",
"snyk": "1.210.0",
"strip-ansi": "5.2.0",

View File

@ -9978,10 +9978,10 @@ rn-host-detect@1.1.5, rn-host-detect@^1.1.5:
resolved "https://registry.yarnpkg.com/rn-host-detect/-/rn-host-detect-1.1.5.tgz#fbecb982b73932f34529e97932b9a63e58d8deb6"
integrity sha512-ufk2dFT3QeP9HyZ/xTuMtW27KnFy815CYitJMqQm+pgG3ZAtHBsrU8nXizNKkqXGy3bQmhEoloVbrfbvMJMqkg==
rn-user-defaults@^1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/rn-user-defaults/-/rn-user-defaults-1.3.5.tgz#8a93325e3fbbc47b1abd4147dc39b25eec8a45ab"
integrity sha512-mqB57aQBb88QK49revJeJGMQXkPl2qtLeF4mINa7XTVCruAruNkm5wgTKLyS5aNLWdd3XIjkkAUSgH6o6FvIVQ==
rn-user-defaults@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/rn-user-defaults/-/rn-user-defaults-1.5.0.tgz#e6b9606e6a74c2ff7785eb4f2fed6bac7583db40"
integrity sha512-PRPpMkzI9/qo/8eCjfR8vKIsJFsmeFxPLT+Jy39X6D5WJLIXN4fY+IxIysOF6E7CkFRW8UCpwxeiMyldXN9Lqw==
rsvp@^3.3.3:
version "3.6.2"