Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of remote android notifications #13028

Merged
merged 4 commits into from
Feb 14, 2022

Conversation

Parveshdhull
Copy link
Member

@Parveshdhull Parveshdhull commented Jan 20, 2022

fixes #12866

PR implements android remote notifications

Code Review Requests:

I tried to make sure google dependencies are removed in the f-droid release build. Please, let me know if I missed something. cc @jakubgs

QA test request:

Changes for android remote notifications may have affected ios remote notifications, please let me know if anything is not working as expected.

Known issue:

PR disables remote notifications for an account at the time of logout. But if the user logs in into another account, without logging out or disabling notifications manually (by logging in while opening the app), then the user will keep receiving notifications for another account

Extras:

#12866 also mentions migrating ios library too. I will create a separate issue/pr for this.

status-go PR

status-im/status-go#2527

status: ready

@Parveshdhull Parveshdhull self-assigned this Jan 20, 2022
@status-im-auto
Copy link
Member

status-im-auto commented Jan 20, 2022

Jenkins Builds

Click to see older builds (93)
Commit #️⃣ Finished (UTC) Duration Platform Result
7a5b470 #1 2022-01-20 21:26:57 ~3 min android-e2e 📄log
7a5b470 #1 2022-01-20 21:26:57 ~3 min android 📄log
✔️ 7a5b470 #1 2022-01-20 21:36:58 ~13 min ios 📦ipa 📲
e9043d6 #2 2022-01-22 22:40:09 ~2 min android-e2e 📄log
e9043d6 #2 2022-01-22 22:40:10 ~2 min android 📄log
✔️ e9043d6 #2 2022-01-22 22:49:02 ~11 min ios 📦ipa 📲
5df4a4e #3 2022-01-22 23:52:54 ~2 min android-e2e 📄log
5df4a4e #3 2022-01-22 23:52:54 ~2 min android 📄log
✖️ 5df4a4e #3 2022-01-23 00:01:39 ~10 min ios 📦ipa 📲
4695b4b #4 2022-01-23 22:21:14 ~1 min android-e2e 📄log
4695b4b #4 2022-01-23 22:21:20 ~2 min android 📄log
✔️ 4695b4b #4 2022-01-23 22:32:45 ~13 min ios 📦ipa 📲
ad60345 #5 2022-01-25 20:22:07 ~2 min android 📄log
ad60345 #5 2022-01-25 20:22:09 ~2 min android-e2e 📄log
✔️ ad60345 #5 2022-01-25 20:31:19 ~11 min ios 📦ipa 📲
004a95f #6 2022-01-25 21:07:17 ~2 min android-e2e 📄log
004a95f #6 2022-01-25 21:07:18 ~2 min android 📄log
✖️ 004a95f #6 2022-01-25 21:15:38 ~10 min ios 📦ipa 📲
32358bb #7 2022-01-25 22:52:01 ~1 min android 📄log
32358bb #7 2022-01-25 22:52:43 ~2 min android-e2e 📄log
✔️ 32358bb #7 2022-01-25 23:01:51 ~11 min ios 📦ipa 📲
095357b #8 2022-01-25 23:15:59 ~1 min android-e2e 📄log
095357b #8 2022-01-25 23:16:20 ~2 min android 📄log
✔️ 095357b #8 2022-01-25 23:25:18 ~11 min ios 📦ipa 📲
✔️ 6869eca #9 2022-01-27 10:39:53 ~11 min ios 📦ipa 📲
6869eca #9 2022-01-27 10:46:16 ~18 min android-e2e 📄log
6869eca #9 2022-01-27 10:47:55 ~19 min android 📄log
✔️ 1fd6495 #10 2022-01-27 22:53:05 ~8 min android-e2e 📦apk 📲
✔️ 1fd6495 #10 2022-01-27 22:53:08 ~8 min android 📦apk 📲
✔️ 1fd6495 #10 2022-01-27 22:55:44 ~11 min ios 📦ipa 📲
✔️ 02bcc84 #11 2022-01-28 20:27:28 ~8 min android-e2e 📦apk 📲
✔️ 02bcc84 #11 2022-01-28 20:27:31 ~8 min android 📦apk 📲
✔️ 02bcc84 #11 2022-01-28 20:30:27 ~11 min ios 📦ipa 📲
✔️ 1573a18 #12 2022-01-29 21:06:11 ~8 min android 📦apk 📲
✔️ 1573a18 #12 2022-01-29 21:06:22 ~8 min android-e2e 📦apk 📲
✔️ 1573a18 #12 2022-01-29 21:08:47 ~10 min ios 📦ipa 📲
✔️ f3aa348 #13 2022-01-29 21:25:20 ~8 min android-e2e 📦apk 📲
✔️ f3aa348 #13 2022-01-29 21:25:21 ~8 min android 📦apk 📲
✔️ f3aa348 #13 2022-01-29 21:27:53 ~10 min ios 📦ipa 📲
✔️ f8aac53 #14 2022-01-29 21:40:53 ~8 min android-e2e 📦apk 📲
✔️ f8aac53 #14 2022-01-29 21:40:53 ~8 min android 📦apk 📲
✔️ f8aac53 #14 2022-01-29 21:43:40 ~10 min ios 📦ipa 📲
✔️ 61135d5 #15 2022-01-30 19:13:12 ~8 min android 📦apk 📲
✔️ 61135d5 #15 2022-01-30 19:15:09 ~10 min android-e2e 📦apk 📲
✔️ 61135d5 #15 2022-01-30 19:19:48 ~14 min ios 📦ipa 📲
✔️ 20458c1 #16 2022-01-30 22:52:20 ~8 min android-e2e 📦apk 📲
✔️ 20458c1 #16 2022-01-30 22:52:30 ~8 min android 📦apk 📲
✔️ 20458c1 #16 2022-01-30 22:54:49 ~10 min ios 📦ipa 📲
✔️ 88b79ba #17 2022-01-30 23:12:55 ~8 min android 📦apk 📲
✔️ 88b79ba #17 2022-01-30 23:13:02 ~8 min android-e2e 📦apk 📲
✔️ 88b79ba #17 2022-01-30 23:16:03 ~11 min ios 📦ipa 📲
✔️ c2e0c76 #18 2022-01-31 00:08:17 ~8 min android 📦apk 📲
✔️ c2e0c76 #18 2022-01-31 00:08:19 ~8 min android-e2e 📦apk 📲
✔️ c2e0c76 #18 2022-01-31 00:11:57 ~11 min ios 📦ipa 📲
✔️ 57c5d16 #19 2022-01-31 00:11:29 ~7 min android-e2e 📦apk 📲
✔️ 57c5d16 #19 2022-01-31 00:12:58 ~8 min android 📦apk 📲
✔️ 57c5d16 #19 2022-01-31 00:15:25 ~11 min ios 📦ipa 📲
✔️ 9614bb0 #20 2022-02-01 18:41:31 ~7 min android 📦apk 📲
✔️ 9614bb0 #20 2022-02-01 18:42:39 ~8 min android-e2e 📦apk 📲
✔️ 9614bb0 #20 2022-02-01 18:46:33 ~12 min ios 📦ipa 📲
✔️ 4d58002 #21 2022-02-01 19:28:11 ~8 min android 📦apk 📲
✔️ 4d58002 #21 2022-02-01 19:28:51 ~9 min android-e2e 📦apk 📲
✔️ 4d58002 #21 2022-02-01 19:31:54 ~12 min ios 📦ipa 📲
✔️ df876df #22 2022-02-02 10:53:16 ~8 min android-e2e 📦apk 📲
✔️ df876df #22 2022-02-02 10:54:26 ~10 min android 📦apk 📲
✔️ df876df #22 2022-02-02 10:57:12 ~12 min ios 📦ipa 📲
✔️ 406e761 #23 2022-02-02 17:23:10 ~8 min android 📦apk 📲
✔️ 406e761 #23 2022-02-02 17:24:18 ~9 min android-e2e 📦apk 📲
✔️ 406e761 #23 2022-02-02 17:28:36 ~13 min ios 📦ipa 📲
✔️ 6e9667b #24 2022-02-02 18:53:41 ~8 min android 📦apk 📲
✔️ 6e9667b #24 2022-02-02 18:53:42 ~8 min android-e2e 📦apk 📲
✔️ 6e9667b #24 2022-02-02 19:00:06 ~14 min ios 📦ipa 📲
✖️ 0e747dc #25 2022-02-05 00:26:29 ~7 min android 📦apk 📲
✖️ 0e747dc #25 2022-02-05 00:26:31 ~7 min android-e2e 📦apk 📲
✖️ 0e747dc #25 2022-02-05 00:30:47 ~11 min ios 📦ipa 📲
✔️ 5bdffc2 #26 2022-02-06 00:29:25 ~8 min android-e2e 📦apk 📲
✔️ 5bdffc2 #26 2022-02-06 00:29:30 ~8 min android 📦apk 📲
✔️ 5bdffc2 #26 2022-02-06 00:32:41 ~11 min ios 📦ipa 📲
✔️ 882ae27 #27 2022-02-07 10:39:10 ~8 min android-e2e 📦apk 📲
✔️ 882ae27 #27 2022-02-07 10:39:15 ~8 min android 📦apk 📲
✔️ 882ae27 #27 2022-02-07 10:42:13 ~11 min ios 📦ipa 📲
✔️ 7a03abc #28 2022-02-07 11:44:27 ~9 min android-e2e 📦apk 📲
✔️ 7a03abc #28 2022-02-07 11:47:19 ~11 min ios 📦ipa 📲
✔️ 7a03abc #28 2022-02-07 11:52:00 ~16 min android 📦apk 📲
47927b7 #29 2022-02-10 12:43:48 ~3 min android-e2e 📄log
47927b7 #29 2022-02-10 12:44:04 ~3 min ios 📄log
47927b7 #29 2022-02-10 12:44:19 ~3 min android 📄log
✔️ c42a3a4 #30 2022-02-10 12:56:06 ~9 min android 📦apk 📲
✔️ c42a3a4 #30 2022-02-10 12:56:29 ~9 min android-e2e 📦apk 📲
✔️ c42a3a4 #30 2022-02-10 13:00:40 ~14 min ios 📦ipa 📲
✔️ 25201b8 #31 2022-02-11 13:05:21 ~10 min android-e2e 📦apk 📲
✔️ 25201b8 #31 2022-02-11 13:05:28 ~10 min android 📦apk 📲
✔️ 25201b8 #31 2022-02-11 13:12:26 ~17 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 66928aa #32 2022-02-11 13:16:57 ~7 min android 📦apk 📲
✔️ 66928aa #32 2022-02-11 13:19:33 ~9 min android-e2e 📦apk 📲
✔️ 66928aa #32 2022-02-11 13:25:22 ~15 min ios 📦ipa 📲
✔️ b17cb16 #33 2022-02-11 14:47:12 ~8 min android 📦apk 📲
✔️ b17cb16 #33 2022-02-11 14:47:24 ~9 min android-e2e 📦apk 📲
✔️ b17cb16 #33 2022-02-11 14:52:09 ~13 min ios 📦ipa 📲

@du82
Copy link
Contributor

du82 commented Jan 20, 2022

This should be an opt-in option, since Google listens to notifications, which would compromise anonymity and privacy of users.

@Parveshdhull
Copy link
Member Author

This should be an opt-in option, since Google listens to notifications, which would compromise anonymity and privacy of users.

Yes, it will be 👍

@flexsurfer
Copy link
Member

flexsurfer commented Jan 21, 2022

hey @Parveshdhull are you considering conditioning this for f-droid builds ? there must be no google services dependencies

@Parveshdhull
Copy link
Member Author

hey @Parveshdhull are you considering conditioning this for f-droid builds ? there must be no google services dependencies

Hi @flexsurfer, first we trying to see if we can make remote android notifications work for android. Once it is complete, I will make sure to condition google dependencies before merging 👍

@Parveshdhull Parveshdhull force-pushed the feature/remote-android-notifications branch 6 times, most recently from 9614bb0 to 4d58002 Compare February 1, 2022 19:19
@Parveshdhull Parveshdhull marked this pull request as ready for review February 1, 2022 19:33
@Parveshdhull Parveshdhull requested a review from jakubgs as a code owner February 1, 2022 19:33
@Parveshdhull Parveshdhull changed the title [WIP] Implementation of remote android notifications Implementation of remote android notifications Feb 1, 2022
@@ -27,6 +27,7 @@
"emojilib": "^2.4.0",
"eth-phishing-detect": "^1.1.13",
"functional-red-black-tree": "^1.0.1",
"hermes-engine": "0.5.2-rc1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO - remove hermes-engine 0.5.2-rc1 once react-native is upgraded to 0.64+ (will create separate issue for this)
wix/react-native-notifications#455 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also please add a comment

@status-im-auto
Copy link
Member

87% of end-end tests have passed

Total executed tests: 82
Failed tests: 11
Passed tests: 71
IDs of failed tests: 6272,3997,6305,5310,5346,5304,6646,6228,3998,5387,5419 

Failed tests (11)

Click to expand
  • Rerun tests

  • 1. test_add_account_to_wallet_private_key_and_seed_phrase, id: 6272

    Device 1: Getting ETH amount
    Device 1: Waiting 400s for ETH updated balance

    Device 1: Balance ETH 0 is not changed during 400 seconds!

    Device sessions

    2. test_group_leave_relogin, id: 3997

    Device 1: Find 'HomeButton' by 'xpath': `//*[contains(@content-desc,'tab, 1 out of 5')]`
    Device 1: Find 'HomeButton' by 'xpath': `//*[contains(@content-desc,'tab, 1 out of 5')]`

    'NoneType' object has no attribute 'click'

    Device sessions

    3. test_image_in_one_to_one_send_save_reply_timeline, id: 6305

    Device 2: Tap on found: Button
    Sharing via messenger

    Device 2: Button by xpath: `//*[contains(@text, "Direct share")]` is not found on the screen

    Device sessions

    4. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310

    Device 1: Looking for chat: 'Unused Composed Elver'
    Device 1: Wait for element 'Button' for max 60s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    5. test_collectible_from_wallet, id: 5346

    Device 1: Find 'Text' by 'xpath': `//*[@text='CryptoKitties']//following-sibling::android.widget.TextView`
    Device 1: Tap on found: Text

    Device 1: Kitty is not shown after opening it from collectibles!

    Device sessions

    6. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304

    Device 1: Find 'BackButton' by 'accessibility id': `Navigate Up`
    Device 1: Looking for chat: 'Royal Defensive Solenodon'

    Error is not shown for invalid public key

    Device sessions

    7. test_set_profile_picture, id: 6646

    Device 2: Looking for a message by text: Text message
    Device 2: Find 'MemberPhoto' by 'xpath': `//*[starts-with(@text,'Text message')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']//*[@content-desc='member-photo']`

    Device 1: Profile picture was not updated in chat

    Device sessions

    8. test_mobile_data_usage_complex_settings, id: 6228

    Device 1: Find 'Button' by 'xpath': `//*[@text="Use mobile data"]/following-sibling::android.widget.Switch[1]`
    Device 1: Find 'Button' by 'xpath': `//*[@text="Ask me when on mobile network"]/following-sibling::android.widget.Switch[1]`

    Not connected to history node after enabling fetching on mobile data Chat history was not fetched with mobile data fetching ON

    Device sessions

    9. test_group_offline_pn, id: 3998

    Device 3: Looking for a message by text: message from old member
    Device 3: Looking for a message by text: message from new member

    message from new member PN was not fetched from offline

    Device sessions

    10. test_delete_chats_via_delete_button_rejoin, id: 5387

    ## Public chat 'public-delete-long-press' is created successfully!
    Device 1: Looking for a message by text: test message:himrwmxwuy

    Messages are not fetched when rejoining public chat after deleting

    Device sessions

    11. test_logcat_backup_recovery_phrase, id: 5419

    Device 1: Checking in logcat for: `element`
    Device 1: Checking in logcat for: `media`

    Device 1: ['Passphrase1 in logcat!!!', 'Passphrase2 in logcat!!!']

    Device sessions

    Passed tests (71)

    Click to expand

    1. test_can_add_existing_ens_on_mainnet, id: 5502
    Device sessions

    2. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    3. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    4. test_keycard_can_recover_keycard_account_card_pairing, id: 5758
    Device sessions

    5. test_public_mark_all_messages_as_read, id: 6270
    Device sessions

    6. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    7. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    8. test_keycard_create_login_restore_unlock_same_seed, id: 5689
    Device sessions

    9. test_public_chat_open_using_deep_link, id: 700739
    Device sessions

    10. test_public_delete_chat_long_press, id: 5319
    Device sessions

    11. test_send_token_with_7_decimals, id: 5350
    Device sessions

    12. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    13. test_public_tag_message, id: 700738
    Device sessions

    14. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    15. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    16. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    17. test_send_eth_from_wallet_to_address_incorrect_password, id: 5308
    Device sessions

    18. test_keycard_send_eth_from_wallet_to_address, id: 6289
    Device sessions

    19. test_public_message_edit, id: 700734
    Device sessions

    20. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    21. test_keycard_sign_message_and_transactions_from_daap, id: 6251
    Device sessions

    22. test_public_link_send_open, id: 700736
    Device sessions

    23. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    24. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    25. test_edit_delete_message_in_one_to_one_, id: 695843
    Device sessions

    26. test_public_links_with_previews_github_youtube_twitter_gif_send_enable, id: 700737
    Device sessions

    27. test_wallet_set_up, id: 5335
    Device sessions

    28. test_account_recovery_with_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 5394
    Device sessions

    29. test_send_and_open_emoji_link_in_one_to_one, id: 5373
    Device sessions

    30. test_block_user_from_public_chat, id: 5786
    Device sessions

    31. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    32. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    33. test_keycard_request_stt_from_daap, id: 6249
    Device sessions

    34. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    35. test_browser_managing_bookmarks, id: 6633
    Device sessions

    36. test_recover_account_from_new_user_seedphrase, id: 6296
    Device sessions

    37. test_group_add_new_member_activity_centre, id: 700732
    Device sessions

    38. test_public_fetch_more_history, id: 5675
    Device sessions

    39. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    40. test_user_can_see_collectibles_on_rinkeby_after_account_recovering, id: 5381
    Device sessions

    41. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    42. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    43. test_add_account_to_multiaccount_instance_generate_new, id: 6224
    Device sessions

    44. test_share_copy_contact_code_and_wallet_address, id: 5323
    Device sessions

    45. test_request_stt_from_dapp, id: 5309
    Device sessions

    46. test_home_view, id: 5379
    Device sessions

    47. test_pass_phrase_validation, id: 5363
    Device sessions

    48. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    49. test_fetching_balance_after_offline, id: 6237
    Device sessions

    50. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    51. test_delete_close_all_tabs, id: 5390
    Device sessions

    52. test_public_unread_messages_counter_for_mentions_relogin, id: 700718
    Device sessions

    53. test_public_navigate_to_chat_when_relaunch, id: 5396
    Device sessions

    54. test_dapps_permissions, id: 5738
    Device sessions

    55. test_group_pn_system_messages_when_invited, id: 3994
    Device sessions

    56. test_group_decline_invite_chat_highligted, id: 5756
    Device sessions

    57. test_public_message_send_check_timestamps_while_on_different_tab, id: 5313
    Device sessions

    58. test_manage_assets, id: 5341
    Device sessions

    59. test_switch_users_special_char_password_and_add_new_account_logcat, id: 5356
    Device sessions

    60. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    61. test_public_unread_messages_counter, id: 5360
    Device sessions

    62. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    63. test_public_emoji_send_copy_paste_reply, id: 700719
    Device sessions

    64. test_public_message_delete, id: 700735
    Device sessions

    65. test_copy_and_paste_messages, id: 5317
    Device sessions

    66. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    67. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    68. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    69. test_group_join_send_text_messages_pn, id: 700731
    Device sessions

    70. test_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    71. test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap, id: 5342
    Device sessions

    scripts/google-free.sh Outdated Show resolved Hide resolved
    @Parveshdhull Parveshdhull force-pushed the feature/remote-android-notifications branch 4 times, most recently from 54d0fe3 to 5bdffc2 Compare February 5, 2022 23:40
    scripts/google-free.sh Outdated Show resolved Hide resolved
    Copy link
    Member

    @jakubgs jakubgs left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Thanks for getting rid of all of those disgusting sed commands.

    scripts/google-free.sh Show resolved Hide resolved
    @flexsurfer
    Copy link
    Member

    flexsurfer commented Feb 11, 2022

    sorry probably this was discussed before, but settings look strange
    image
    we need to somehow make them similar and add a description for notification, or rename to Local notifications and add description service on your device will be running

    @Parveshdhull
    Copy link
    Member Author

    Hi @pavloburykh, Thanks for adding steps to reproduce 2nd issue. I think currently remote PN is only supported for messages, not wallet transactions (issue also exists in the ios - nightly version). Maybe we can work on this issue separately? wdyt

    @pavloburykh
    Copy link
    Contributor

    @Parveshdhull I'm receiving wallet PN on IOS nightly version (attaching video below). But anyway, I agree with you, that we can add remote wallet PN for Android by separate issue in order not to block this PR.

    telegram-cloud-document-2-5202025987612611585.mp4

    @pavloburykh
    Copy link
    Contributor

    sorry probably this was discussed before, but settings look strange image we need to somehow make them similar and add a description for notification, or rename to Local notifications and add description service on your device will be running

    @Parveshdhull in terms of this comment I would like to add, that currently Notification switcher seems to have 2 functions - enables/disables notifications overall and enables background notifications in case if Remote notification switcher is disabled (attaching video below demonstrating current behaviour). It might be a little bit confusing for a user. And better decision would be to rename Notification switcher to smth like Local notifications as was proposed by @flexsurfer but also to make this switcher independent and responsible only for enabling/disabling Background notifications.

    telegram-cloud-document-2-5199941120292820514.mp4

    I think we might think to improve above issues in case if Notifications version implemented by this PR is considered to be final version.

    In case if we consider this version to be temporary one and we are planning to improve it in nearest future then we are good to go at this moment without additional UX/UI fixes.

    @Parveshdhull Parveshdhull force-pushed the feature/remote-android-notifications branch from c42a3a4 to 25201b8 Compare February 11, 2022 12:54
    @Parveshdhull
    Copy link
    Member Author

    Parveshdhull commented Feb 11, 2022

    Hi @pavloburykh, I updated the UI as requested by you and @flexsurfer.
    Also for ISSUE 2, I think we need to show a local notification for wallet transactions if the app is running(and remote notifications are enabled) as we can't send confidential information in remote notifications. Please feel free to create a separate issue for that and assign me. And please let me know if new changes are working as expected. Thank you

    @status-im-auto
    Copy link
    Member

    88% of end-end tests have passed

    Total executed tests: 83
    Failed tests: 10
    Passed tests: 73
    
    IDs of failed tests: 6228,6283,5346,5310,6305,5762,5675,5387,6293,6226 
    

    Failed tests (10)

    Click to expand
  • Rerun tests

  • 1. test_mobile_data_usage_complex_settings, id: 6228

    Device 1: Find 'Button' by 'xpath': `//*[@text="Use mobile data"]/following-sibling::android.widget.Switch[1]`
    Device 1: Find 'Button' by 'xpath': `//*[@text="Ask me when on mobile network"]/following-sibling::android.widget.Switch[1]`

    Not connected to history node after enabling fetching on mobile data Chat history was not fetched with mobile data fetching ON

    Device sessions

    2. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283

    Device 1: Tap on found: Button
    Device 1: Find 'Button' by 'accessibility id': `notifications-settings-button`

    Device 1: Button by accessibility id: `notifications-settings-button` is not found on the screen

    Device sessions

    3. test_collectible_from_wallet, id: 5346

    Device 1: Find 'Text' by 'xpath': `//*[@text='CryptoKitties']//following-sibling::android.widget.TextView`
    Device 1: Tap on found: Text

    Device 1: Kitty is not shown after opening it from collectibles!

    Device sessions

    4. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310

    Device 1: Looking for chat: 'Vital Critical Echidna'
    Device 1: Wait for element 'Button' for max 60s and click when it is available

    Device 1: Button by accessibility id:`notifications-unread-badge` is not found on the screen

    Device sessions

    5. test_image_in_one_to_one_send_save_reply_timeline, id: 6305

    Device 2: Find 'AllowButton' by 'xpath': `//*[@text="Allow" or @text="ALLOW"]`
    Device 2: Find 'Button' by 'xpath': `//*[@content-desc='open-gallery']/following-sibling::android.view.ViewGroup[1]`

    Status of another user not shown when open another user profile Status of another user not shown when open another user profile

    Device sessions

    6. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762

    Device 1: Looking for a message by text: I am blocked user
    Device 1: Find 'ChatElementByText' by 'xpath': `//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']`

    Device 1: ChatElementByText by xpath:`//*[starts-with(@text,'I am blocked user')]/ancestor::android.view.ViewGroup[@content-desc='chat-item']` is not found on the screen

    Device sessions

    7. test_public_fetch_more_history, id: 5675

    ## Public chat 'lmdjfgj' is created successfully!
    # STEP: Check that can fetch previous history for several days

    Device 1: "Feb 10, 2022" is not shown

    Device sessions

    8. test_delete_chats_via_delete_button_rejoin, id: 5387

    ## Public chat 'public-delete-long-press' is created successfully!
    Device 1: Looking for a message by text: test message:cspliopcsh

    Messages are not fetched when rejoining public chat after deleting

    Device sessions

    9. test_keycard_send_eth_in_1_1_chat, id: 6293

    Device 1: Find 'SignWithKeycardButton' by 'xpath': `//*[contains(@text,'Sign with')]`
    Device 1: Enter default pin 111111

    Device 1: Transaction failed; also Unexpected Alert is shown: 'replacement transaction underpriced'

    Device sessions

    10. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226

    Device 1: Tap on found: Button
    Device 1: Find 'EditBox' by 'xpath': `//*[@content-desc='chat-icon']/../android.widget.TextView[2]`

    Device 1: EditBox by xpath: `//*[@content-desc='chat-icon']/../android.widget.TextView[2]` is not found on the screen

    Device sessions

    Passed tests (73)

    Click to expand

    1. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    2. test_public_mark_all_messages_as_read, id: 6270
    Device sessions

    3. test_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    4. test_keycard_create_login_restore_unlock_same_seed, id: 5689
    Device sessions

    5. test_onboarding_add_new_multiaccount_username_by_position_pass_validation, id: 700747
    Device sessions

    6. test_onboarding_share_wallet_address, id: 700744
    Device sessions

    7. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    8. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    9. test_dapps_permissions, id: 5738
    Device sessions

    10. test_fetching_balance_after_offline, id: 6237
    Device sessions

    11. test_keycard_sign_message_and_transactions_from_daap, id: 6251
    Device sessions

    12. test_set_profile_picture, id: 6646
    Device sessions

    13. test_public_link_send_open, id: 700736
    Device sessions

    14. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    15. test_group_leave_relogin, id: 3997
    Device sessions

    16. test_send_eth_from_wallet_to_address_incorrect_password, id: 5308
    Device sessions

    17. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    18. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    19. test_public_tag_message, id: 700738
    Device sessions

    20. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    21. test_edit_delete_message_in_one_to_one_, id: 695843
    Device sessions

    22. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    23. test_manage_assets, id: 5341
    Device sessions

    24. test_onboarding_share_contact_address, id: 700743
    Device sessions

    25. test_add_account_to_wallet_private_key_and_seed_phrase, id: 6272
    Device sessions

    26. test_onboarding_backup_seed_phrase_restore_same_login_logcat, id: 700745
    Device sessions

    27. test_delete_close_all_tabs, id: 5390
    Device sessions

    28. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    29. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    30. test_copy_and_paste_messages, id: 5317
    Device sessions

    31. test_recover_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 700748
    Device sessions

    32. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    33. test_public_emoji_send_copy_paste_reply, id: 700719
    Device sessions

    34. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    35. test_recover_set_up_wallet_sign_phrase, id: 700749
    Device sessions

    36. test_public_unread_messages_counter, id: 5360
    Device sessions

    37. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    38. test_keycard_request_stt_from_daap, id: 6249
    Device sessions

    39. test_public_chat_open_using_deep_link, id: 700739
    Device sessions

    40. test_onboarding_home_initial_popup, id: 700742
    Device sessions

    41. test_group_offline_pn, id: 3998
    Device sessions

    42. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    43. test_keycard_can_recover_keycard_account_card_pairing, id: 5758
    Device sessions

    44. test_public_navigate_to_chat_when_relaunch, id: 5396
    Device sessions

    45. test_user_can_see_collectibles_on_rinkeby_after_account_recovering, id: 5381
    Device sessions

    46. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    47. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    48. test_browser_managing_bookmarks, id: 6633
    Device sessions

    49. test_block_user_from_public_chat, id: 5786
    Device sessions

    50. test_public_message_delete, id: 700735
    Device sessions

    51. test_keycard_send_eth_from_wallet_to_address, id: 6289
    Device sessions

    52. test_send_token_with_7_decimals, id: 5350
    Device sessions

    53. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    54. test_onboarding_cant_sign_in_with_invalid_password_logcat, id: 700746
    Device sessions

    55. test_request_stt_from_dapp, id: 5309
    Device sessions

    56. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    57. test_public_unread_messages_counter_for_mentions_relogin, id: 700718
    Device sessions

    58. test_add_account_to_multiaccount_instance_generate_new, id: 6224
    Device sessions

    59. test_public_message_send_check_timestamps_while_on_different_tab, id: 5313
    Device sessions

    60. test_public_message_edit, id: 700734
    Device sessions

    61. test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap, id: 5342
    Device sessions

    62. test_group_join_send_text_messages_pn, id: 700731
    Device sessions

    63. test_group_add_new_member_activity_centre, id: 700732
    Device sessions

    64. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    65. test_can_add_existing_ens_on_mainnet, id: 5502
    Device sessions

    66. test_group_pn_system_messages_when_invited, id: 3994
    Device sessions

    67. test_group_decline_invite_chat_highligted, id: 5756
    Device sessions

    68. test_public_links_with_previews_github_youtube_twitter_gif_send_enable, id: 700737
    Device sessions

    69. test_public_delete_chat_long_press, id: 5319
    Device sessions

    70. test_send_and_open_emoji_link_in_one_to_one, id: 5373
    Device sessions

    71. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    72. test_recover_validation_seed_phrase_field, id: 700750
    Device sessions

    73. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    @status-im-auto
    Copy link
    Member

    80% of end-end tests have passed

    Total executed tests: 10
    Failed tests: 2
    Passed tests: 8
    
    IDs of failed tests: 6283,5346 
    

    Failed tests (2)

    Click to expand
  • Rerun tests

  • 1. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283

    Device 1: Tap on found: Button
    Device 1: Find 'Button' by 'accessibility id': `notifications-settings-button`

    Device 1: Button by accessibility id: `notifications-settings-button` is not found on the screen

    Device sessions

    2. test_collectible_from_wallet, id: 5346

    Device 1: Find 'Text' by 'xpath': `//*[@text='CryptoKitties']//following-sibling::android.widget.TextView`
    Device 1: Tap on found: Text

    Device 1: Kitty is not shown after opening it from collectibles!

    Device sessions

    Passed tests (8)

    Click to expand

    1. test_public_fetch_more_history, id: 5675
    Device sessions

    2. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    3. test_image_in_one_to_one_send_save_reply_timeline, id: 6305
    Device sessions

    4. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    5. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    6. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    7. test_mobile_data_usage_complex_settings, id: 6228
    Device sessions

    8. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    @Parveshdhull
    Copy link
    Member Author

    Device 1: Button by accessibility id: notifications-settings-button is not found on the screen

    This is now replaced by :local-notifications-settings-button

    @pavloburykh
    Copy link
    Contributor

    • Failure screenshot

    Thanx @Parveshdhull we will update test.

    churik added a commit that referenced this pull request Feb 14, 2022
    @pavloburykh
    Copy link
    Contributor

    @Parveshdhull Thanx for all fixes. PR is now ready for merge.

    @Parveshdhull Parveshdhull merged commit 36c7d8e into develop Feb 14, 2022
    @Parveshdhull Parveshdhull deleted the feature/remote-android-notifications branch February 14, 2022 11:57
    churik added a commit that referenced this pull request Feb 14, 2022
    Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    No open projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Implement remote android notifications
    6 participants