diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/foss/res/values/strings.xml similarity index 100% rename from android/app/src/main/res/values/strings.xml rename to android/app/src/foss/res/values/strings.xml diff --git a/android/app/src/official/AndroidManifest.xml b/android/app/src/official/AndroidManifest.xml new file mode 100644 index 000000000..b0f7bf8db --- /dev/null +++ b/android/app/src/official/AndroidManifest.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/official/google-services.json b/android/app/src/official/google-services.json new file mode 100644 index 000000000..f6e7e6b9a --- /dev/null +++ b/android/app/src/official/google-services.json @@ -0,0 +1,231 @@ +{ + "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 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "chat.rocket.reactnative" + } + } + ] + } + } + }, + { + "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 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "chat.rocket.reactnative" + } + } + ] + } + } + }, + { + "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 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "chat.rocket.reactnative" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:673693445664:android:8be27b1f7c42a2ed", + "android_client_info": { + "package_name": "chat.rocket.reactnative" + } + }, + "oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "chat.rocket.reactnative" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:673693445664:android:64932c99863e2838", + "android_client_info": { + "package_name": "com.konecty.rocket.chat" + } + }, + "oauth_client": [ + { + "client_id": "673693445664-3ajben08beuco6eout3kpod2gbbm8fij.apps.googleusercontent.com", + "client_type": 1, + "android_info": { + "package_name": "com.konecty.rocket.chat", + "certificate_hash": "cd5806ba3f0141d0f2e47acfe64a485f575108ab" + } + }, + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDIkZj1TRz8TmhnMswDwVY5OnWuzFK3rxg" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "673693445664-97s9t777ful7mn2510vuhb48958qd9tb.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "673693445664-jbf9m30ta163gobjfp0v7j1v7kpo7kmv.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "chat.rocket.reactnative" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/official/java/chat/rocket/reactnative/CustomPushNotification.java b/android/app/src/official/java/chat/rocket/reactnative/CustomPushNotification.java new file mode 100644 index 000000000..2c058b6f6 --- /dev/null +++ b/android/app/src/official/java/chat/rocket/reactnative/CustomPushNotification.java @@ -0,0 +1,305 @@ +package chat.rocket.reactnative; + +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.PendingIntent; +import android.app.RemoteInput; +import android.content.Intent; +import android.content.Context; +import android.content.res.Resources; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.drawable.Icon; +import android.os.Build; +import android.os.Bundle; +import android.app.Person; + +import com.google.gson.*; +import com.bumptech.glide.Glide; +import com.bumptech.glide.load.resource.bitmap.RoundedCorners; +import com.bumptech.glide.request.RequestOptions; +import java.util.concurrent.ExecutionException; +import java.lang.InterruptedException; + +import com.facebook.react.bridge.ReactApplicationContext; +import com.wix.reactnativenotifications.core.AppLaunchHelper; +import com.wix.reactnativenotifications.core.AppLifecycleFacade; +import com.wix.reactnativenotifications.core.JsIOHelper; +import com.wix.reactnativenotifications.core.notification.PushNotification; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.ArrayList; +import java.util.Date; + +import chat.rocket.reactnative.R; + +import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME; + +public class CustomPushNotification extends PushNotification { + public static ReactApplicationContext reactApplicationContext; + + public CustomPushNotification(Context context, Bundle bundle, AppLifecycleFacade appLifecycleFacade, AppLaunchHelper appLaunchHelper, JsIOHelper jsIoHelper) { + super(context, bundle, appLifecycleFacade, appLaunchHelper, jsIoHelper); + reactApplicationContext = new ReactApplicationContext(context); + } + + private static Map> notificationMessages = new HashMap>(); + public static String KEY_REPLY = "KEY_REPLY"; + public static String NOTIFICATION_ID = "NOTIFICATION_ID"; + + public static void clearMessages(int notId) { + notificationMessages.remove(Integer.toString(notId)); + } + + @Override + public void onReceived() throws InvalidNotificationException { + final Bundle bundle = mNotificationProps.asBundle(); + + String notId = bundle.getString("notId", "1"); + String title = bundle.getString("title"); + + if (notificationMessages.get(notId) == null) { + notificationMessages.put(notId, new ArrayList()); + } + + Gson gson = new Gson(); + Ejson ejson = gson.fromJson(bundle.getString("ejson", "{}"), Ejson.class); + + boolean hasSender = ejson.sender != null; + + bundle.putLong("time", new Date().getTime()); + bundle.putString("username", hasSender ? ejson.sender.username : title); + bundle.putString("senderId", hasSender ? ejson.sender._id : "1"); + bundle.putString("avatarUri", ejson.getAvatarUri()); + + notificationMessages.get(notId).add(bundle); + + super.postNotification(Integer.parseInt(notId)); + + notifyReceivedToJS(); + } + + @Override + public void onOpened() { + Bundle bundle = mNotificationProps.asBundle(); + final String notId = bundle.getString("notId", "1"); + notificationMessages.remove(notId); + digestNotification(); + } + + @Override + protected Notification.Builder getNotificationBuilder(PendingIntent intent) { + final Notification.Builder notification = new Notification.Builder(mContext); + + Bundle bundle = mNotificationProps.asBundle(); + String notId = bundle.getString("notId", "1"); + String title = bundle.getString("title"); + String message = bundle.getString("message"); + + notification + .setContentTitle(title) + .setContentText(message) + .setContentIntent(intent) + .setPriority(Notification.PRIORITY_HIGH) + .setDefaults(Notification.DEFAULT_ALL) + .setAutoCancel(true); + + Integer notificationId = Integer.parseInt(notId); + notificationColor(notification); + notificationChannel(notification); + notificationIcons(notification, bundle); + notificationStyle(notification, notificationId, bundle); + notificationReply(notification, notificationId, bundle); + notificationDismiss(notification, notificationId); + + return notification; + } + + private void notifyReceivedToJS() { + mJsIOHelper.sendEventToJS(NOTIFICATION_RECEIVED_EVENT_NAME, mNotificationProps.asBundle(), mAppLifecycleFacade.getRunningReactContext()); + } + + private Bitmap getAvatar(String uri) { + try { + return Glide.with(mContext) + .asBitmap() + .apply(RequestOptions.bitmapTransform(new RoundedCorners(10))) + .load(uri) + .submit(100, 100) + .get(); + } catch (final ExecutionException | InterruptedException e) { + return largeIcon(); + } + } + + private Bitmap largeIcon() { + final Resources res = mContext.getResources(); + String packageName = mContext.getPackageName(); + int largeIconResId = res.getIdentifier("ic_launcher", "mipmap", packageName); + Bitmap largeIconBitmap = BitmapFactory.decodeResource(res, largeIconResId); + return largeIconBitmap; + } + + private void notificationIcons(Notification.Builder notification, Bundle bundle) { + final Resources res = mContext.getResources(); + String packageName = mContext.getPackageName(); + + int smallIconResId = res.getIdentifier("rocket_chat_notification", "drawable", packageName); + + Gson gson = new Gson(); + Ejson ejson = gson.fromJson(bundle.getString("ejson", "{}"), Ejson.class); + + notification.setSmallIcon(smallIconResId); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { + notification.setLargeIcon(getAvatar(ejson.getAvatarUri())); + } + } + + private void notificationChannel(Notification.Builder notification) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + String CHANNEL_ID = "rocketchatrn_channel_01"; + String CHANNEL_NAME = "All"; + + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, + CHANNEL_NAME, + NotificationManager.IMPORTANCE_DEFAULT); + + final NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); + notificationManager.createNotificationChannel(channel); + + notification.setChannelId(CHANNEL_ID); + } + } + + private String extractMessage(String message, Ejson ejson) { + if (ejson.type != null && !ejson.type.equals("d")) { + int pos = message.indexOf(":"); + int start = pos == -1 ? 0 : pos + 2; + return message.substring(start, message.length()); + } + return message; + } + + private void notificationColor(Notification.Builder notification) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + notification.setColor(mContext.getColor(R.color.notification_text)); + } + } + + private void notificationStyle(Notification.Builder notification, int notId, Bundle bundle) { + List bundles = notificationMessages.get(Integer.toString(notId)); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { + Notification.InboxStyle messageStyle = new Notification.InboxStyle(); + if (bundles != null) { + for (int i = 0; i < bundles.size(); i++) { + Bundle data = bundles.get(i); + String message = data.getString("message"); + + messageStyle.addLine(message); + } + } + + notification.setStyle(messageStyle); + } else { + Notification.MessagingStyle messageStyle; + + Gson gson = new Gson(); + Ejson ejson = gson.fromJson(bundle.getString("ejson", "{}"), Ejson.class); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { + messageStyle = new Notification.MessagingStyle(""); + } else { + Person sender = new Person.Builder() + .setKey("") + .setName("") + .build(); + messageStyle = new Notification.MessagingStyle(sender); + } + + String title = bundle.getString("title"); + messageStyle.setConversationTitle(title); + + if (bundles != null) { + for (int i = 0; i < bundles.size(); i++) { + Bundle data = bundles.get(i); + + long timestamp = data.getLong("time"); + String message = data.getString("message"); + String username = data.getString("username"); + String senderId = data.getString("senderId"); + String avatarUri = data.getString("avatarUri"); + + String m = extractMessage(message, ejson); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { + messageStyle.addMessage(m, timestamp, username); + } else { + Bitmap avatar = getAvatar(avatarUri); + + Person.Builder sender = new Person.Builder() + .setKey(senderId) + .setName(username); + + if (avatar != null) { + sender.setIcon(Icon.createWithBitmap(avatar)); + } + + Person person = sender.build(); + + messageStyle.addMessage(m, timestamp, person); + } + } + } + + notification.setStyle(messageStyle); + } + } + + private void notificationReply(Notification.Builder notification, int notificationId, Bundle bundle) { + String notId = bundle.getString("notId", "1"); + String ejson = bundle.getString("ejson", "{}"); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N || notId.equals("1") || ejson.equals("{}")) { + return; + } + String label = "Reply"; + + final Resources res = mContext.getResources(); + String packageName = mContext.getPackageName(); + int smallIconResId = res.getIdentifier("rocket_chat_notification", "drawable", packageName); + + Intent replyIntent = new Intent(mContext, ReplyBroadcast.class); + replyIntent.setAction(KEY_REPLY); + replyIntent.putExtra("pushNotification", bundle); + + PendingIntent replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT); + + RemoteInput remoteInput = new RemoteInput.Builder(KEY_REPLY) + .setLabel(label) + .build(); + + CharSequence title = label; + Notification.Action replyAction = new Notification.Action.Builder(smallIconResId, title, replyPendingIntent) + .addRemoteInput(remoteInput) + .setAllowGeneratedReplies(true) + .build(); + + notification + .setShowWhen(true) + .addAction(replyAction); + } + + private void notificationDismiss(Notification.Builder notification, int notificationId) { + Intent intent = new Intent(mContext, DismissNotification.class); + intent.putExtra(NOTIFICATION_ID, notificationId); + + PendingIntent dismissPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, intent, 0); + + notification.setDeleteIntent(dismissPendingIntent); + } + +} diff --git a/android/app/src/official/java/chat/rocket/reactnative/DismissNotification.java b/android/app/src/official/java/chat/rocket/reactnative/DismissNotification.java new file mode 100644 index 000000000..32524a35f --- /dev/null +++ b/android/app/src/official/java/chat/rocket/reactnative/DismissNotification.java @@ -0,0 +1,13 @@ +package chat.rocket.reactnative; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; + +public class DismissNotification extends BroadcastReceiver { + @Override + public void onReceive(Context context, Intent intent) { + int notId = intent.getExtras().getInt(CustomPushNotification.NOTIFICATION_ID); + CustomPushNotification.clearMessages(notId); + } +} diff --git a/android/app/src/official/java/chat/rocket/reactnative/Ejson.java b/android/app/src/official/java/chat/rocket/reactnative/Ejson.java new file mode 100644 index 000000000..59b26cea6 --- /dev/null +++ b/android/app/src/official/java/chat/rocket/reactnative/Ejson.java @@ -0,0 +1,43 @@ +package chat.rocket.reactnative; + +import android.content.SharedPreferences; + +import chat.rocket.userdefaults.RNUserDefaultsModule; + +public class Ejson { + String host; + String rid; + String type; + Sender sender; + + private String TOKEN_KEY = "reactnativemeteor_usertoken-"; + private SharedPreferences sharedPreferences = RNUserDefaultsModule.getPreferences(CustomPushNotification.reactApplicationContext, "rocket.chat", "chat.rocket.android"); + + public String getAvatarUri() { + if (type == null) { + return null; + } + return serverURL() + "/avatar/" + this.sender.username + "?rc_token=" + token() + "&rc_uid=" + userId(); + } + + public String token() { + return sharedPreferences.getString(TOKEN_KEY.concat(userId()), ""); + } + + public String userId() { + return sharedPreferences.getString(TOKEN_KEY.concat(serverURL()), ""); + } + + public String serverURL() { + String url = this.host; + if (url != null && url.endsWith("/")) { + url = url.substring(0, url.length() - 1); + } + return url; + } + + public class Sender { + String username; + String _id; + } +} \ No newline at end of file diff --git a/android/app/src/official/java/chat/rocket/reactnative/ReplyBroadcast.java b/android/app/src/official/java/chat/rocket/reactnative/ReplyBroadcast.java new file mode 100644 index 000000000..20ed6d2ed --- /dev/null +++ b/android/app/src/official/java/chat/rocket/reactnative/ReplyBroadcast.java @@ -0,0 +1,157 @@ +package chat.rocket.reactnative; + +import android.app.Notification; +import android.app.NotificationChannel; +import android.app.NotificationManager; +import android.app.RemoteInput; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.res.Resources; +import android.os.Build; +import android.os.Bundle; +import android.util.Log; +import java.io.IOException; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import java.util.HashMap; +import java.util.Map; + +import okhttp3.Call; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +import chat.rocket.userdefaults.RNUserDefaultsModule; +import com.wix.reactnativenotifications.core.NotificationIntentAdapter; + +public class ReplyBroadcast extends BroadcastReceiver { + private Context mContext; + private Bundle bundle; + private NotificationManager notificationManager; + + @Override + public void onReceive(Context context, Intent intent) { + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.N) { + final CharSequence message = getReplyMessage(intent); + if (message == null) { + return; + } + + mContext = context; + bundle = NotificationIntentAdapter.extractPendingNotificationDataFromIntent(intent); + notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); + + String notId = bundle.getString("notId"); + + Gson gson = new Gson(); + Ejson ejson = gson.fromJson(bundle.getString("ejson", "{}"), Ejson.class); + + replyToMessage(ejson, Integer.parseInt(notId), message); + } + } + + protected void replyToMessage(final Ejson ejson, final int notId, final CharSequence message) { + String serverURL = ejson.serverURL(); + String rid = ejson.rid; + + if (serverURL == null || rid == null) { + return; + } + + final OkHttpClient client = new OkHttpClient(); + final MediaType JSON = MediaType.parse("application/json; charset=utf-8"); + + String json = buildMessage(rid, message.toString()); + + CustomPushNotification.clearMessages(notId); + + RequestBody body = RequestBody.create(JSON, json); + Request request = new Request.Builder() + .header("x-auth-token", ejson.token()) + .header("x-user-id", ejson.userId()) + .url(String.format("%s/api/v1/chat.sendMessage", serverURL)) + .post(body) + .build(); + + client.newCall(request).enqueue(new okhttp3.Callback() { + @Override + public void onFailure(Call call, IOException e) { + Log.i("RCNotification", String.format("Reply FAILED exception %s", e.getMessage())); + onReplyFailed(notificationManager, notId); + } + + @Override + public void onResponse(Call call, final Response response) throws IOException { + if (response.isSuccessful()) { + Log.d("RCNotification", "Reply SUCCESS"); + onReplySuccess(notificationManager, notId); + } else { + Log.i("RCNotification", String.format("Reply FAILED status %s BODY %s", response.code(), response.body().string())); + onReplyFailed(notificationManager, notId); + } + } + }); + } + + private String getMessageId() { + final String ALPHA_NUMERIC_STRING = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + int count = 17; + StringBuilder builder = new StringBuilder(); + while (count-- != 0) { + int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length()); + builder.append(ALPHA_NUMERIC_STRING.charAt(character)); + } + return builder.toString(); + } + + protected String buildMessage(String rid, String message) { + Gson gsonBuilder = new GsonBuilder().create(); + + Map msgMap = new HashMap(); + msgMap.put("_id", getMessageId()); + msgMap.put("rid", rid); + msgMap.put("msg", message); + msgMap.put("tmid", null); + + Map msg = new HashMap(); + msg.put("message", msgMap); + + String json = gsonBuilder.toJson(msg); + + return json; + } + + protected void onReplyFailed(NotificationManager notificationManager, int notId) { + String CHANNEL_ID = "CHANNEL_ID_REPLY_FAILED"; + + final Resources res = mContext.getResources(); + String packageName = mContext.getPackageName(); + int smallIconResId = res.getIdentifier("rocket_chat_notification", "drawable", packageName); + + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_ID, NotificationManager.IMPORTANCE_LOW); + notificationManager.createNotificationChannel(channel); + Notification notification = + new Notification.Builder(mContext, CHANNEL_ID) + .setContentTitle("Failed to reply message.") + .setSmallIcon(smallIconResId) + .build(); + + notificationManager.notify(notId, notification); + } + + protected void onReplySuccess(NotificationManager notificationManager, int notId) { + notificationManager.cancel(notId); + } + + private CharSequence getReplyMessage(Intent intent) { + Bundle remoteInput = RemoteInput.getResultsFromIntent(intent); + if (remoteInput != null) { + return remoteInput.getCharSequence(CustomPushNotification.KEY_REPLY); + } + return null; + } +} diff --git a/android/app/src/official/res/drawable-anydpi-v21/rocket_chat_notification.xml b/android/app/src/official/res/drawable-anydpi-v21/rocket_chat_notification.xml new file mode 100644 index 000000000..47079e973 --- /dev/null +++ b/android/app/src/official/res/drawable-anydpi-v21/rocket_chat_notification.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/android/app/src/official/res/drawable-hdpi/disclosure_indicator.png b/android/app/src/official/res/drawable-hdpi/disclosure_indicator.png new file mode 100644 index 000000000..9f6fd1dab Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/disclosure_indicator.png differ diff --git a/android/app/src/official/res/drawable-hdpi/disclosure_indicator_server.png b/android/app/src/official/res/drawable-hdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..287976ba3 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/official/res/drawable-hdpi/hashtag.png b/android/app/src/official/res/drawable-hdpi/hashtag.png new file mode 100644 index 000000000..5d4be58c7 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/hashtag.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_facebook.png b/android/app/src/official/res/drawable-hdpi/icon_facebook.png new file mode 100644 index 000000000..5c637c075 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_facebook.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_github.png b/android/app/src/official/res/drawable-hdpi/icon_github.png new file mode 100644 index 000000000..32dbe3316 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_github.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_gitlab.png b/android/app/src/official/res/drawable-hdpi/icon_gitlab.png new file mode 100644 index 000000000..ce6c68bff Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_gitlab.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_google.png b/android/app/src/official/res/drawable-hdpi/icon_google.png new file mode 100644 index 000000000..c84a47c76 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_google.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_linkedin.png b/android/app/src/official/res/drawable-hdpi/icon_linkedin.png new file mode 100644 index 000000000..93708032c Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_linkedin.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_meteor.png b/android/app/src/official/res/drawable-hdpi/icon_meteor.png new file mode 100644 index 000000000..1d793b136 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_meteor.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_twitter.png b/android/app/src/official/res/drawable-hdpi/icon_twitter.png new file mode 100644 index 000000000..4b057eddf Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_twitter.png differ diff --git a/android/app/src/official/res/drawable-hdpi/icon_wordpress.png b/android/app/src/official/res/drawable-hdpi/icon_wordpress.png new file mode 100644 index 000000000..4dbc11e67 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/icon_wordpress.png differ diff --git a/android/app/src/official/res/drawable-hdpi/livechat.png b/android/app/src/official/res/drawable-hdpi/livechat.png new file mode 100644 index 000000000..b2190ca73 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/livechat.png differ diff --git a/android/app/src/official/res/drawable-hdpi/lock.png b/android/app/src/official/res/drawable-hdpi/lock.png new file mode 100644 index 000000000..68537368f Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/lock.png differ diff --git a/android/app/src/official/res/drawable-hdpi/logo.png b/android/app/src/official/res/drawable-hdpi/logo.png new file mode 100644 index 000000000..6d56e9f5d Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/logo.png differ diff --git a/android/app/src/official/res/drawable-hdpi/sort_activity.png b/android/app/src/official/res/drawable-hdpi/sort_activity.png new file mode 100644 index 000000000..2be5be129 Binary files /dev/null and b/android/app/src/official/res/drawable-hdpi/sort_activity.png differ diff --git a/android/app/src/official/res/drawable-mdpi/disclosure_indicator.png b/android/app/src/official/res/drawable-mdpi/disclosure_indicator.png new file mode 100644 index 000000000..42caa0676 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/disclosure_indicator.png differ diff --git a/android/app/src/official/res/drawable-mdpi/disclosure_indicator_server.png b/android/app/src/official/res/drawable-mdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..87923b2fc Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/official/res/drawable-mdpi/hashtag.png b/android/app/src/official/res/drawable-mdpi/hashtag.png new file mode 100644 index 000000000..e4a79ec30 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/hashtag.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_facebook.png b/android/app/src/official/res/drawable-mdpi/icon_facebook.png new file mode 100644 index 000000000..b362e2ffd Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_facebook.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_github.png b/android/app/src/official/res/drawable-mdpi/icon_github.png new file mode 100644 index 000000000..af76b3fdd Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_github.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_gitlab.png b/android/app/src/official/res/drawable-mdpi/icon_gitlab.png new file mode 100644 index 000000000..908f0f31a Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_gitlab.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_google.png b/android/app/src/official/res/drawable-mdpi/icon_google.png new file mode 100644 index 000000000..776775448 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_google.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_linkedin.png b/android/app/src/official/res/drawable-mdpi/icon_linkedin.png new file mode 100644 index 000000000..29cbe97f9 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_linkedin.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_meteor.png b/android/app/src/official/res/drawable-mdpi/icon_meteor.png new file mode 100644 index 000000000..5489e031f Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_meteor.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_twitter.png b/android/app/src/official/res/drawable-mdpi/icon_twitter.png new file mode 100644 index 000000000..4570f1a51 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_twitter.png differ diff --git a/android/app/src/official/res/drawable-mdpi/icon_wordpress.png b/android/app/src/official/res/drawable-mdpi/icon_wordpress.png new file mode 100644 index 000000000..cc24baf40 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/icon_wordpress.png differ diff --git a/android/app/src/official/res/drawable-mdpi/livechat.png b/android/app/src/official/res/drawable-mdpi/livechat.png new file mode 100644 index 000000000..5047b8e50 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/livechat.png differ diff --git a/android/app/src/official/res/drawable-mdpi/lock.png b/android/app/src/official/res/drawable-mdpi/lock.png new file mode 100644 index 000000000..a87c44950 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/lock.png differ diff --git a/android/app/src/official/res/drawable-mdpi/logo.png b/android/app/src/official/res/drawable-mdpi/logo.png new file mode 100644 index 000000000..375dae9cc Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/logo.png differ diff --git a/android/app/src/official/res/drawable-mdpi/sort_activity.png b/android/app/src/official/res/drawable-mdpi/sort_activity.png new file mode 100644 index 000000000..e64f442e5 Binary files /dev/null and b/android/app/src/official/res/drawable-mdpi/sort_activity.png differ diff --git a/android/app/src/official/res/drawable-v24/ic_launcher_background.xml b/android/app/src/official/res/drawable-v24/ic_launcher_background.xml new file mode 100644 index 000000000..6e2c4fed1 --- /dev/null +++ b/android/app/src/official/res/drawable-v24/ic_launcher_background.xml @@ -0,0 +1,21 @@ + + + + + + + + + + diff --git a/android/app/src/official/res/drawable-xhdpi/disclosure_indicator.png b/android/app/src/official/res/drawable-xhdpi/disclosure_indicator.png new file mode 100644 index 000000000..585d4a797 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/disclosure_indicator.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/disclosure_indicator_server.png b/android/app/src/official/res/drawable-xhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..bed48962f Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/hashtag.png b/android/app/src/official/res/drawable-xhdpi/hashtag.png new file mode 100644 index 000000000..d76738e3a Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/hashtag.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_facebook.png b/android/app/src/official/res/drawable-xhdpi/icon_facebook.png new file mode 100644 index 000000000..e9543fd0f Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_facebook.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_github.png b/android/app/src/official/res/drawable-xhdpi/icon_github.png new file mode 100644 index 000000000..f92f531e6 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_github.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_gitlab.png b/android/app/src/official/res/drawable-xhdpi/icon_gitlab.png new file mode 100644 index 000000000..92a633c84 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_gitlab.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_google.png b/android/app/src/official/res/drawable-xhdpi/icon_google.png new file mode 100644 index 000000000..4fb517cff Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_google.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_linkedin.png b/android/app/src/official/res/drawable-xhdpi/icon_linkedin.png new file mode 100644 index 000000000..e96d63def Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_linkedin.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_meteor.png b/android/app/src/official/res/drawable-xhdpi/icon_meteor.png new file mode 100644 index 000000000..25b8bc182 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_meteor.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_twitter.png b/android/app/src/official/res/drawable-xhdpi/icon_twitter.png new file mode 100644 index 000000000..7f8cf4796 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_twitter.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/icon_wordpress.png b/android/app/src/official/res/drawable-xhdpi/icon_wordpress.png new file mode 100644 index 000000000..e3457517b Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/icon_wordpress.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/livechat.png b/android/app/src/official/res/drawable-xhdpi/livechat.png new file mode 100644 index 000000000..64e12138a Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/livechat.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/lock.png b/android/app/src/official/res/drawable-xhdpi/lock.png new file mode 100644 index 000000000..ba072523b Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/lock.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/logo.png b/android/app/src/official/res/drawable-xhdpi/logo.png new file mode 100644 index 000000000..3e85a65d2 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/logo.png differ diff --git a/android/app/src/official/res/drawable-xhdpi/sort_activity.png b/android/app/src/official/res/drawable-xhdpi/sort_activity.png new file mode 100644 index 000000000..533d1aa63 Binary files /dev/null and b/android/app/src/official/res/drawable-xhdpi/sort_activity.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator.png b/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator.png new file mode 100644 index 000000000..3c8634648 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator_server.png b/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..c0f6074d6 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/hashtag.png b/android/app/src/official/res/drawable-xxhdpi/hashtag.png new file mode 100644 index 000000000..e083190f9 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/hashtag.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_facebook.png b/android/app/src/official/res/drawable-xxhdpi/icon_facebook.png new file mode 100644 index 000000000..d6d01570f Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_facebook.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_github.png b/android/app/src/official/res/drawable-xxhdpi/icon_github.png new file mode 100644 index 000000000..de7533292 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_github.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_gitlab.png b/android/app/src/official/res/drawable-xxhdpi/icon_gitlab.png new file mode 100644 index 000000000..fb8211a7d Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_gitlab.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_google.png b/android/app/src/official/res/drawable-xxhdpi/icon_google.png new file mode 100644 index 000000000..02342b216 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_google.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_linkedin.png b/android/app/src/official/res/drawable-xxhdpi/icon_linkedin.png new file mode 100644 index 000000000..674c9ef3e Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_linkedin.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_meteor.png b/android/app/src/official/res/drawable-xxhdpi/icon_meteor.png new file mode 100644 index 000000000..b7a0a8457 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_meteor.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_twitter.png b/android/app/src/official/res/drawable-xxhdpi/icon_twitter.png new file mode 100644 index 000000000..3faaeac18 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_twitter.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/icon_wordpress.png b/android/app/src/official/res/drawable-xxhdpi/icon_wordpress.png new file mode 100644 index 000000000..82b896631 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/icon_wordpress.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/livechat.png b/android/app/src/official/res/drawable-xxhdpi/livechat.png new file mode 100644 index 000000000..14e8a801b Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/livechat.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/lock.png b/android/app/src/official/res/drawable-xxhdpi/lock.png new file mode 100644 index 000000000..7b310acce Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/lock.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/logo.png b/android/app/src/official/res/drawable-xxhdpi/logo.png new file mode 100644 index 000000000..a13087a4e Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/logo.png differ diff --git a/android/app/src/official/res/drawable-xxhdpi/sort_activity.png b/android/app/src/official/res/drawable-xxhdpi/sort_activity.png new file mode 100644 index 000000000..dac1d40e8 Binary files /dev/null and b/android/app/src/official/res/drawable-xxhdpi/sort_activity.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator.png b/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator.png new file mode 100644 index 000000000..d9a8f9079 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator_server.png b/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator_server.png new file mode 100644 index 000000000..fa6f1db55 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/disclosure_indicator_server.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/hashtag.png b/android/app/src/official/res/drawable-xxxhdpi/hashtag.png new file mode 100644 index 000000000..c79e0c6ba Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/hashtag.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_facebook.png b/android/app/src/official/res/drawable-xxxhdpi/icon_facebook.png new file mode 100644 index 000000000..d19bdb238 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_facebook.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_github.png b/android/app/src/official/res/drawable-xxxhdpi/icon_github.png new file mode 100644 index 000000000..619329670 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_github.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_gitlab.png b/android/app/src/official/res/drawable-xxxhdpi/icon_gitlab.png new file mode 100644 index 000000000..01100b0fa Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_gitlab.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_google.png b/android/app/src/official/res/drawable-xxxhdpi/icon_google.png new file mode 100644 index 000000000..7693fdfc3 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_google.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_linkedin.png b/android/app/src/official/res/drawable-xxxhdpi/icon_linkedin.png new file mode 100644 index 000000000..677a22b77 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_linkedin.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_meteor.png b/android/app/src/official/res/drawable-xxxhdpi/icon_meteor.png new file mode 100644 index 000000000..eeb52443f Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_meteor.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_twitter.png b/android/app/src/official/res/drawable-xxxhdpi/icon_twitter.png new file mode 100644 index 000000000..fda06f996 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_twitter.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/icon_wordpress.png b/android/app/src/official/res/drawable-xxxhdpi/icon_wordpress.png new file mode 100644 index 000000000..6d7f42995 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/icon_wordpress.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/livechat.png b/android/app/src/official/res/drawable-xxxhdpi/livechat.png new file mode 100644 index 000000000..6cc6f9071 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/livechat.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/lock.png b/android/app/src/official/res/drawable-xxxhdpi/lock.png new file mode 100644 index 000000000..0673b6aa8 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/lock.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/logo.png b/android/app/src/official/res/drawable-xxxhdpi/logo.png new file mode 100644 index 000000000..8adfb1674 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/logo.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/message_empty_black.png b/android/app/src/official/res/drawable-xxxhdpi/message_empty_black.png new file mode 100644 index 000000000..2a86c6985 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/message_empty_black.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/message_empty_dark.png b/android/app/src/official/res/drawable-xxxhdpi/message_empty_dark.png new file mode 100644 index 000000000..6865688b0 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/message_empty_dark.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/message_empty_light.png b/android/app/src/official/res/drawable-xxxhdpi/message_empty_light.png new file mode 100644 index 000000000..74c630594 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/message_empty_light.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/sort_activity.png b/android/app/src/official/res/drawable-xxxhdpi/sort_activity.png new file mode 100644 index 000000000..1a8c76129 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/sort_activity.png differ diff --git a/android/app/src/official/res/drawable-xxxhdpi/splash.png b/android/app/src/official/res/drawable-xxxhdpi/splash.png new file mode 100644 index 000000000..ad69ba207 Binary files /dev/null and b/android/app/src/official/res/drawable-xxxhdpi/splash.png differ diff --git a/android/app/src/official/res/drawable/ic_launcher_background.xml b/android/app/src/official/res/drawable/ic_launcher_background.xml new file mode 100644 index 000000000..1369c4c71 --- /dev/null +++ b/android/app/src/official/res/drawable/ic_launcher_background.xml @@ -0,0 +1,9 @@ + + + diff --git a/android/app/src/official/res/drawable/ic_launcher_foreground.xml b/android/app/src/official/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 000000000..4fb25367c --- /dev/null +++ b/android/app/src/official/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/android/app/src/official/res/drawable/launch_screen.xml b/android/app/src/official/res/drawable/launch_screen.xml new file mode 100644 index 000000000..a85f4c9fe --- /dev/null +++ b/android/app/src/official/res/drawable/launch_screen.xml @@ -0,0 +1,12 @@ + + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher.xml b/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 000000000..6f2acb4f0 --- /dev/null +++ b/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher_round.xml b/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher_round.xml new file mode 100644 index 000000000..6f2acb4f0 --- /dev/null +++ b/android/app/src/official/res/mipmap-anydpi-v26/ic_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/official/res/mipmap-hdpi/ic_launcher.png b/android/app/src/official/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000..f1878e47b Binary files /dev/null and b/android/app/src/official/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/official/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/official/res/mipmap-hdpi/ic_launcher_background.png new file mode 100644 index 000000000..8538bed39 Binary files /dev/null and b/android/app/src/official/res/mipmap-hdpi/ic_launcher_background.png differ diff --git a/android/app/src/official/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/official/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 000000000..bd72cd260 Binary files /dev/null and b/android/app/src/official/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/official/res/mipmap-mdpi/ic_launcher.png b/android/app/src/official/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000..1e3da8a39 Binary files /dev/null and b/android/app/src/official/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/official/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/official/res/mipmap-mdpi/ic_launcher_background.png new file mode 100644 index 000000000..a92ccfafb Binary files /dev/null and b/android/app/src/official/res/mipmap-mdpi/ic_launcher_background.png differ diff --git a/android/app/src/official/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/official/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 000000000..dfb390737 Binary files /dev/null and b/android/app/src/official/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/official/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/official/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000..ce6abf0d6 Binary files /dev/null and b/android/app/src/official/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/official/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/official/res/mipmap-xhdpi/ic_launcher_background.png new file mode 100644 index 000000000..3ba37c9e9 Binary files /dev/null and b/android/app/src/official/res/mipmap-xhdpi/ic_launcher_background.png differ diff --git a/android/app/src/official/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/official/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 000000000..710fac56a Binary files /dev/null and b/android/app/src/official/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/official/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000..1ba89143e Binary files /dev/null and b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_background.png new file mode 100644 index 000000000..07f6de5a9 Binary files /dev/null and b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 000000000..86822fdd2 Binary files /dev/null and b/android/app/src/official/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000..2830a1249 Binary files /dev/null and b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_background.png new file mode 100644 index 000000000..5ae3008fe Binary files /dev/null and b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_background.png differ diff --git a/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_round.png new file mode 100644 index 000000000..a17913dc1 Binary files /dev/null and b/android/app/src/official/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/official/res/values-night/colors.xml b/android/app/src/official/res/values-night/colors.xml new file mode 100644 index 000000000..1e24e3159 --- /dev/null +++ b/android/app/src/official/res/values-night/colors.xml @@ -0,0 +1,4 @@ + + + #000000 + \ No newline at end of file diff --git a/android/app/src/official/res/values/colors.xml b/android/app/src/official/res/values/colors.xml new file mode 100644 index 000000000..8ba17e337 --- /dev/null +++ b/android/app/src/official/res/values/colors.xml @@ -0,0 +1,6 @@ + + + #660B0B0B + #eeeff1 + #CC3333 + \ No newline at end of file diff --git a/android/app/src/official/res/values/strings.xml b/android/app/src/official/res/values/strings.xml new file mode 100644 index 000000000..22a0b201d --- /dev/null +++ b/android/app/src/official/res/values/strings.xml @@ -0,0 +1,4 @@ + + Rocket.Chat + Rocket.Chat + diff --git a/android/app/src/official/res/values/styles.xml b/android/app/src/official/res/values/styles.xml new file mode 100644 index 000000000..50861d8e0 --- /dev/null +++ b/android/app/src/official/res/values/styles.xml @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/android/app/src/official/res/xml/network_security_config.xml b/android/app/src/official/res/xml/network_security_config.xml new file mode 100644 index 000000000..bb6ab93df --- /dev/null +++ b/android/app/src/official/res/xml/network_security_config.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/android/app/src/play/res/values/strings.xml b/android/app/src/play/res/values/strings.xml new file mode 100644 index 000000000..e8e7ca8c1 --- /dev/null +++ b/android/app/src/play/res/values/strings.xml @@ -0,0 +1,4 @@ + + Rocket.Chat Experimental + Rocket.Chat Experimental + diff --git a/package.json b/package.json index 9540b2f06..d782e4fa1 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "generate-source-maps-android": "bugsnag-sourcemaps", "postinstall": "patch-package && jetify", "play": "npx react-native run-android --variant=playDebug", - "foss": "npx react-native run-android --variant=fossDebug" + "foss": "npx react-native run-android --variant=fossDebug", + "official": "npx react-native run-android --variant=officialDebug" }, "husky": { "hooks": {