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

Notifications #10294

Merged
merged 2 commits into from
Apr 28, 2020
Merged

Notifications #10294

merged 2 commits into from
Apr 28, 2020

Conversation

yenda
Copy link
Contributor

@yenda yenda commented Apr 7, 2020

status: ready

@yenda yenda requested a review from a team as a code owner April 7, 2020 16:28
@yenda yenda self-assigned this Apr 7, 2020
@status-github-bot
Copy link

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Apr 7, 2020
@status-im-auto
Copy link
Member

status-im-auto commented Apr 7, 2020

Jenkins Builds

Click to see older builds (25)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9998241 #1 2020-04-07 16:36:54 ~8 min ios 📦ipa 📲
✔️ 9998241 #1 2020-04-07 16:41:47 ~13 min android 📦apk 📲
✔️ 9998241 #1 2020-04-07 16:42:07 ~13 min android-e2e 📦apk 📲
✔️ a8c6aa7 #2 2020-04-09 10:37:50 ~8 min ios 📦ipa 📲
✔️ a8c6aa7 #2 2020-04-09 10:38:23 ~9 min android 📦apk 📲
✔️ a8c6aa7 #2 2020-04-09 10:38:33 ~9 min android-e2e 📦apk 📲
2b540a9 #3 2020-04-13 23:48:34 ~3 min ios 📄log
✔️ 2b540a9 #3 2020-04-13 23:53:07 ~8 min android-e2e 📦apk 📲
✔️ 2b540a9 #3 2020-04-13 23:55:03 ~10 min android 📦apk 📲
✔️ 2b540a9 #4 2020-04-14 09:11:19 ~9 min ios 📦ipa 📲
✔️ 920a052 #5 2020-04-14 09:20:48 ~8 min ios 📦ipa 📲
✔️ 920a052 #4 2020-04-14 09:27:23 ~14 min android-e2e 📦apk 📲
✔️ 920a052 #4 2020-04-14 09:27:24 ~14 min android 📦apk 📲
✔️ a2f990c #5 2020-04-14 11:17:21 ~9 min android 📦apk 📲
✔️ a2f990c #6 2020-04-14 11:17:32 ~9 min ios 📦ipa 📲
✔️ a2f990c #5 2020-04-14 11:23:02 ~14 min android-e2e 📦apk 📲
✔️ c445d91 #7 2020-04-14 12:17:22 ~9 min ios 📦ipa 📲
✔️ c445d91 #6 2020-04-14 12:22:02 ~14 min android-e2e 📦apk 📲
✔️ c445d91 #6 2020-04-14 12:22:08 ~14 min android 📦apk 📲
✔️ cb3122d #7 2020-04-14 13:26:08 ~11 min android-e2e 📦apk 📲
✔️ cb3122d #8 2020-04-14 13:26:52 ~12 min ios 📦ipa 📲
✔️ cb3122d #7 2020-04-14 13:27:16 ~12 min android 📦apk 📲
✔️ ac54b7b #9 2020-04-20 08:58:39 ~9 min ios 📦ipa 📲
✔️ ac54b7b #8 2020-04-20 09:02:28 ~13 min android-e2e 📦apk 📲
✔️ ac54b7b #8 2020-04-20 09:02:30 ~13 min android 📦apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 2b4286d #10 2020-04-28 20:27:44 ~9 min ios 📦ipa 📲
✔️ 35dd4b0 #10 2020-04-28 20:42:21 ~16 min android-e2e 📦apk 📲
✔️ 35dd4b0 #10 2020-04-28 20:42:21 ~16 min android 📦apk 📲

Copy link
Member

@cammellos cammellos left a comment

Choose a reason for hiding this comment

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

it would be worth having an e2e test covering this, as we don't test this part so often and if the format changes we might not notice, maybe worth mentioning to test-team. Nice work!

@flexsurfer flexsurfer moved this from REVIEW to E2E Tests in Pipeline for QA Apr 7, 2020
@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 97
Failed tests: 1
Passed tests: 96

Failed tests (1)

Click to expand
1. test_request_and_receive_stt_in_1_1_chat_offline

Device 2: Tap on HomeButton
Device 2: Wait for PlusButton

Device 2: 'ChatElement' is not found on the screen

Device sessions

Passed tests (96)

Click to expand
1. test_request_public_key_status_test_daap
Device sessions

2. test_open_public_chat_using_deep_link
Device sessions

3. test_decline_invitation_to_group_chat
Device sessions

4. test_ens_username_recipient
Device sessions

5. test_offline_status
Device sessions

6. test_open_transaction_on_etherscan
Device sessions

7. test_open_chat_by_pasting_public_key
Device sessions

8. test_back_forward_buttons_browsing_website
Device sessions

9. test_password_in_logcat_creating_account
Device sessions

10. test_can_use_purchased_stickers_on_recovered_account
Device sessions

11. test_modify_transaction_fee_values
Device sessions

12. test_insufficient_funds_wallet_positive_balance
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_delete_group_chat_via_delete_button
Device sessions

15. test_open_google_com_via_open_dapp
Device sessions

16. test_logcat_backup_recovery_phrase
Device sessions

17. test_unread_messages_counter_public_chat
Device sessions

18. test_send_two_transactions_one_after_another_in_dapp
Device sessions

19. test_message_marked_as_sent_in_1_1_chat
Device sessions

20. test_user_can_switch_network
Device sessions

21. test_public_chat_clear_history (TestRail link is not found)
Device sessions

22. test_wallet_set_up
Device sessions

23. test_timestamp_in_chats
Device sessions

24. test_delete_chats_via_delete_button
Device sessions

25. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

26. test_group_chat_system_messages
Device sessions

27. test_fetch_more_history_in_empty_chat
Device sessions

28. test_mobile_data_usage_popup_continue_syncing
Device sessions

29. test_add_to_contacts
Device sessions

30. test_dapps_permissions
Device sessions

31. test_long_press_delete_clear_all_dapps
Device sessions

32. test_need_help_section
Device sessions

33. test_transaction_wrong_password_wallet
Device sessions

34. test_offline_messaging_1_1_chat
Device sessions

35. test_token_with_more_than_allowed_decimals
Device sessions

36. test_add_account_to_multiaccount_instance_private_key
Device sessions

37. test_text_message_1_1_chat
Device sessions

38. test_install_pack_and_send_sticker
Device sessions

39. test_send_eth_in_1_1_chat
Device sessions

40. test_make_admin_member_of_group_chat
Device sessions

41. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

42. test_send_emoji
Device sessions

43. test_copy_and_paste_messages
Device sessions

44. test_clear_history_of_group_chat_via_group_view
Device sessions

45. test_add_account_to_multiaccount_instance_generate_new
Device sessions

46. test_send_eth_from_wallet_to_address
Device sessions

47. test_messaging_in_different_networks
Device sessions

48. test_start_chat_with_ens
Device sessions

49. test_logcat_recovering_account
Device sessions

50. test_connection_is_secure
Device sessions

51. test_send_eth_to_ens
Device sessions

52. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

53. test_add_new_group_chat_member
Device sessions

54. test_long_press_to_delete_chat
Device sessions

55. test_add_and_remove_contact_from_public_chat
Device sessions

56. test_send_transaction_from_daap
Device sessions

57. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

58. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

59. test_open_blocked_site
Device sessions

60. test_refresh_button_browsing_app_webview
Device sessions

61. test_pass_phrase_validation
Device sessions

62. test_send_token_with_7_decimals
Device sessions

63. test_sign_message_from_daap
Device sessions

64. test_send_message_in_group_chat
Device sessions

65. test_deploy_contract_from_daap
Device sessions

66. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

67. test_add_new_keycard_account
Device sessions

68. test_add_custom_token
Device sessions

69. test_decline_transactions_in_1_1_chat
Device sessions

70. test_send_and_open_links
Device sessions

71. test_manage_assets
Device sessions

72. test_share_contact_code_and_wallet_address
Device sessions

73. test_redirect_to_public_chat_tapping_tag_message
Device sessions

74. test_block_user_from_public_chat
Device sessions

75. test_ens_in_public_and_1_1_chats
Device sessions

76. test_sign_typed_message
Device sessions

77. test_create_new_group_chat
Device sessions

78. test_password_in_logcat_sign_in
Device sessions

79. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

80. test_send_message_to_newly_added_contact
Device sessions

81. test_logcat_sign_message_from_daap
Device sessions

82. test_mobile_data_usage_popup_stop_syncing
Device sessions

83. test_collectible_from_wallet_opens_in_browser_view
Device sessions

84. test_logcat_send_transaction_from_daap
Device sessions

85. test_contact_profile_view
Device sessions

86. test_switch_users_and_add_new_account
Device sessions

87. test_logcat_send_transaction_from_wallet
Device sessions

88. test_filters_from_daap
Device sessions

89. test_send_stt_from_wallet
Device sessions

90. test_login_with_new_account
Device sessions

91. test_home_view
Device sessions

92. test_log_level_and_fleet
Device sessions

93. test_can_add_existing_ens
Device sessions

94. test_copy_contact_code_and_wallet_address
Device sessions

95. test_fetching_balance_after_offline
Device sessions

96. test_can_see_all_transactions_in_history
Device sessions

@Serhy Serhy moved this from E2E Tests to IN TESTING in Pipeline for QA Apr 8, 2020
@Serhy
Copy link
Contributor

Serhy commented Apr 9, 2020

Issue 1
PushNotification appears from any contact when received in 1-1 chat.
I think we should not have notification for contacts who not in the user Contacts list (that like we had in the past: if message received from contact who not is in the contact list - no PushNotification appears.

Issue 2
When tapping on push notifications while in Status a different chat view was opened then an empty chat view is opened. If I send any message from that view there is no message appears in view. They sent in "real" 1-1 chat but endless spinner will be below each message.

Video of issue: https://drive.google.com/file/d/1z4F-Eb4YXKIGCmCtxUlMPxOLV9e4LJas/view
(@cammellos maybe knows the secret behind 2nd issue)

@cammellos
Copy link
Member

cammellos commented Apr 9, 2020

A few things I was thinking:

It's probably best not to use messages.new for notifications, rather, we should probably have a new field that only contains the notifications that java processes.

That way we can customize notifications (only for contacts, only for some chats and not necessarily only for messages, for example we could have mentions).

In terms of enabling them only for contacts, I am not sure it will be clear enough for the user. Currently there's no incentive in adding someone to contacts (it's basically a noop), so I would be more inclined to have a separate menu (settings for a chat, we might have something similar already, which will come handy when we do disappearing messages, mute chat).

Another thing is that we can always show an updated list of notifications, as status-go can instruct java to display the whole list.
For example instead of having every single message differently, we could say:
"You received 2 messages from etc"
etc

cc @errorists

@yenda
Copy link
Contributor Author

yenda commented Apr 9, 2020

@Serhy

  1. this was a limitation due to the fact that we just couldn't technically show a notification for messages that were not from contact since notifications required exchanging an id for the push notification service. Now it is not necessary anymore so we can show notifications for pretty much anything. But as @cammellos mentionned we can do some filtering on status-go side in the future based on user preferences.
  2. I am not able to reproduce this issue on my android device, do you have so more specific reproducible steps, I tried this:
  • open a chat and a add contact, exchange a few message
  • open #status chat and put app in background
  • send message from other device, open notification
    In the video it looks like it's what you did and it opens a different chat but in my case it opens the right one

@yenda
Copy link
Contributor Author

yenda commented Apr 9, 2020

@cammellos @Serhy ok actually I was able to reproduce in the PR build but not in the debug build

@yenda
Copy link
Contributor Author

yenda commented Apr 9, 2020

@Serhy ok looks like it is good after rebase I wasn't able to reproduce. I think we could go with the current settings of receiving notifications for all 1-1 chat, and next step is to do some work on status-go for filtering what gets a notifications, add settings in status-react and notifications for other chats and part of the app. @errorists @rachelhamlin wdyt?

@rachelhamlin
Copy link
Contributor

@yenda @Serhy +1 on 1-1 notifications for all dms. There's so little reason to add someone as a contact on Status right now—I'd rather ensure the PN service is running for as many users as possible and mirror SMS behavior.

Later, we can add settings. Sounds brilliant.

@Serhy
Copy link
Contributor

Serhy commented Apr 10, 2020

@yenda thank you.
With the latest builds (0.14.0 (20200409103022)) tested in iOS13 and Android8.1 and Android9:
I'm trying to realise what's happening with PN now, because it's randomly (now until I understand) happens any of three:
a) Either this Issue2 from #10294 (comment) that separate 1-1 chat opens still reproduced OR
b) Everything is absolutely fine and no Issue2 OR
c) Error Cannnot read property 'lastIndexOf' of null appears when tap on PN (see below Issue3 it's description and logs)

Issue3 This one is annoying in terms of reproduction because it was appearing all the time, but gone after I restarted Android devices. I anyway report it and trying to understand meanwhile when it appears.
So there is no redirect to 1-1 chat view after tap on PushNotification but Status opens with error: Cannot read property 'lastIndexOf' of null

To reproduce:

  1. Create new accounts on Device1 and Device2
  2. Device2 enables 'Notifications' from Profile
  3. Device2 puts app on background
  4. Device1 sends message Device2

Screenshot 2020-04-09 at 19 22 43

Logcat:

04-09 17:23:40.478 31470 31470 E StatusModule: intent received: im.status.ethereum.module.TAP_NOTIFICATION
04-09 17:23:40.507 31470 31544 D ReactNativeJS: DEBUG [status-im.utils.handlers:32] - Handling re-frame event:  :handle-universal-link
04-09 17:23:40.509 31470 31544 D ReactNativeJS: DEBUG [status-im.utils.universal-links.events:9] - universal links: event received for  status-im://chat/private/0x042d34e113f45eae1d01fb125f2cccd715a192d130c92d1712411a72f26ce3a6bd06d5243d155aeddf86450a04ad38894d738dede501039ae41691877eda9c7763
04-09 17:23:40.511 31470 31544 I ReactNativeJS: INFO [status-im.utils.universal-links.core:77] - universal-links: handling private chat 0x042d34e113f45eae1d01fb125f2cccd715a192d130c92d1712411a72f26ce3a6bd06d5243d155aeddf86450a04ad38894d738dede501039ae41691877eda9c7763
04-09 17:23:40.513 31470 31544 I ReactNativeJS: PRETTY PRINTED EXCEPTION
04-09 17:23:40.513 31470 31544 I ReactNativeJS: 
04-09 17:23:40.513 31470 31544 I ReactNativeJS: ***
04-09 17:23:40.513 31470 31544 I ReactNativeJS: NAME: "TypeError"
04-09 17:23:40.513 31470 31544 I ReactNativeJS: MESSAGE: Cannot read property 'lastIndexOf' of null
04-09 17:23:40.513 31470 31544 I ReactNativeJS: 
04-09 17:23:40.513 31470 31544 I ReactNativeJS: TypeError: Cannot read property 'lastIndexOf' of null
04-09 17:23:40.513 31470 31544 I ReactNativeJS:     at y (address at index.android.bundle:1:1763665)
04-09 17:23:40.513 31470 31544 I ReactNativeJS:     at n (address at index.android.bundle:1:3187866)
04-09 17:23:40.513 31470 31544 I ReactNativeJS:     at anonymous (address at index.android.bundle:1:3191568)
04-09 17:23:40.513 31470 31544 I ReactNativeJS:     at anonymous (address at index.android.bundle:1:3191206)
04-09 17:23:40.513 31470 31544 I ReactNativeJS:     at anonymous (address at index.android.bundle:1:3014735)

Issue4 Very often I see PN not destroyed (marked as read) after it was tapped. Instead PN received from contacts accumulates into huge list. And when there are PN from multiple contacts it becomes messy so I ended up on tapping wrong PN and opening 1-1 chat with false impression there were no messages
To reproduce:

  1. Create new account UserA and enables notifications
  2. UserA puts app on background
  3. Another UserB sends text message to UserA
  4. UserA tap on PN received and opens Status
  5. UserA puts app on background
  6. Now third UserC sends text message to UserA
  7. UserA checks the list of PN to see if there are no PushNotification at all
    Actual result: You got 1 messages in 1 chat (the very last message). Nothing happens when I tap it (I can swipe right/left upon it to remove, but the with the next PN whole list of previous messages re-appears)

Screenshot 2020-04-10 at 11 49 56

Issue5 Contact names in PN expose bold markdown ( tags)

Screenshot 2020-04-10 at 11 57 16

@Serhy
Copy link
Contributor

Serhy commented Apr 10, 2020

Issue6 I'd be very thankful if we fix the next (it a bug itself and needed to fixed to allow easier implementation of autotest)
If user puts Status on background by tapping hardware Back button then no navigation to 1-1 chat will happen after tap on PushNotification (user appears on Home view)
To reproduce:

  1. Create new UserA and enabled notifications
  2. UserA taps hardware Android Back button to put Status on background
  3. UserB sends a message to UserA
  4. UserA taps on appeared PN
    Actual result: Chats main view opened (not 1-1 chat)

@rachelhamlin
Copy link
Contributor

These all sound like potential blockers to me. Nice work @Serhy.

Also going to want to update that copy :)

Do all the notifications compile into one @yenda?

"You have a new message" would be my preference for my single message.
"You have 2 new messages" would be my preference for plural.

@yenda yenda force-pushed the notifications branch 2 times, most recently from 2b540a9 to 920a052 Compare April 14, 2020 09:12
@yenda
Copy link
Contributor Author

yenda commented Apr 14, 2020

Issue 1 as discussed could be dealt with later, and is actually a feature TM

Issue 2 Issue3 I think those should be fixed now, I fixed two things:

  • Android intent were not being recreated even when the data changed because it would only care about the notificationId, so one problem was that when you received notifications from different chats they would not always reuse the same notificationId and inherit the intent of another chat, opening the wrong chat. So I made sure intents are now refreshed properly.
  • if the chat didn't exist already it wasn't created, hence the error in issue 3.

Issue4 Issue5 These issues were caused by the legacy implementation of groups, I removed it entirely because after testing on Android 7 it does some grouping already (albeit not as good as Android 8 and newer)

Issue6 I am looking into this one I thought it would be fixed along with 2/3 but I reproduced it again in the PR build

@yenda
Copy link
Contributor Author

yenda commented Apr 14, 2020

Ok 6 should be fixed in the next build. Android is actually calling onHostDestroy when you press the back button, which stops the service, so I just made sure the service isn't stopped then. That means even if you kill the app the service will keep running.

edit: well I happened to have fixed another bug but there is still an issue with the universal link being empty when app was killed and opened from notification (which happens with back button press)

@yenda
Copy link
Contributor Author

yenda commented Apr 14, 2020

@Serhy same bug already exists it's not related to PN but to universal links, when the activity is destroyed with the back button, the universal link isn't loaded on resume. So if you open a universal link with after the same steps you get the same result. I would suggest we create an issue for it and fix it separately, as it is not cause by this PR and is a broader issue that needs to be fixed

@yenda
Copy link
Contributor Author

yenda commented Apr 14, 2020

@Serhy I added a fix for universal links

@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 91
Failed tests: 1
Passed tests: 90

Failed tests (1)

Click to expand
1. test_wallet_set_up

Device 1: Looking for an element by text part: 'These three words prove that a transaction is safe.'
Device 1: Looking for an element by text part: 'You should see these words before signing each transaction. If you don't, cancel and sign out.'

'These three words prove that a transaction is safe.' text is not displayed 'You should see these words before signing each transaction. If you don't, cancel and sign out.' text is not displayed 'These three words prove that a transaction is sa

Device sessions

Passed tests (90)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
Device sessions

6. test_timestamp_in_chats
Device sessions

7. test_password_in_logcat_sign_in
Device sessions

8. test_logcat_recovering_account
Device sessions

9. test_modify_transaction_fee_values
Device sessions

10. test_public_chat_clear_history (TestRail link is not found)
Device sessions

11. test_need_help_section
Device sessions

12. test_send_and_open_links
Device sessions

13. test_mobile_data_usage_popup_stop_syncing
Device sessions

14. test_mobile_data_usage_settings
Device sessions

15. test_create_new_group_chat
Device sessions

16. test_sign_typed_message
Device sessions

17. test_user_can_switch_network
Device sessions

18. test_mobile_data_usage_popup_continue_syncing
Device sessions

19. test_home_view
Device sessions

20. test_open_google_com_via_open_dapp
Device sessions

21. test_send_message_to_newly_added_contact
Device sessions

22. test_share_contact_code_and_wallet_address
Device sessions

23. test_connection_is_secure
Device sessions

24. test_add_to_contacts
Device sessions

25. test_add_account_to_multiaccount_instance_private_key
Device sessions

26. test_refresh_button_browsing_app_webview
Device sessions

27. test_can_add_existing_ens
Device sessions

28. test_transaction_wrong_password_wallet
Device sessions

29. test_unread_messages_counter_public_chat
Device sessions

30. test_text_message_1_1_chat
Device sessions

31. test_can_use_purchased_stickers_on_recovered_account
Device sessions

32. test_open_transaction_on_etherscan
Device sessions

33. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

34. test_contact_profile_view
Device sessions

35. test_offline_add_new_group_chat_member
Device sessions

36. test_logcat_backup_recovery_phrase
Device sessions

37. test_start_chat_with_ens
Device sessions

38. test_add_and_remove_contact_from_public_chat
Device sessions

39. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

40. test_open_blocked_site
Device sessions

41. test_open_chat_by_pasting_public_key
Device sessions

42. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

43. test_ens_username_recipient
Device sessions

44. test_token_with_more_than_allowed_decimals
Device sessions

45. test_fetch_more_history_in_empty_chat
Device sessions

46. test_open_public_chat_using_deep_link
Device sessions

47. test_switch_users_and_add_new_account
Device sessions

48. test_add_account_to_multiaccount_instance_generate_new
Device sessions

49. test_copy_contact_code_and_wallet_address
Device sessions

50. test_send_transaction_from_daap
Device sessions

51. test_send_eth_to_ens
Device sessions

52. test_send_two_transactions_one_after_another_in_dapp
Device sessions

53. test_message_marked_as_sent_in_1_1_chat
Device sessions

54. test_long_press_delete_clear_all_dapps
Device sessions

55. test_copy_and_paste_messages
Device sessions

56. test_deploy_contract_from_daap
Device sessions

57. test_back_forward_buttons_browsing_website
Device sessions

58. test_password_in_logcat_creating_account
Device sessions

59. test_add_custom_token
Device sessions

60. test_sign_message_from_daap
Device sessions

61. test_dapps_permissions
Device sessions

62. test_request_public_key_status_test_daap
Device sessions

63. test_logcat_send_transaction_from_wallet
Device sessions

64. test_long_press_to_delete_chat
Device sessions

65. test_log_level_and_fleet
Device sessions

66. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

67. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

68. test_send_eth_in_1_1_chat
Device sessions

69. test_ens_in_public_and_1_1_chats
Device sessions

70. test_block_user_from_public_chat
Device sessions

71. test_fetching_balance_after_offline
Device sessions

72. test_logcat_sign_message_from_daap
Device sessions

73. test_offline_status
Device sessions

74. test_manage_assets
Device sessions

75. test_offline_messaging_1_1_chat
Device sessions

76. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

77. test_add_new_keycard_account
Device sessions

78. test_send_token_with_7_decimals
Device sessions

79. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

80. test_pass_phrase_validation
Device sessions

81. test_send_emoji
Device sessions

82. test_filters_from_daap
Device sessions

83. test_redirect_to_public_chat_tapping_tag_message
Device sessions

84. test_logcat_send_transaction_from_daap
Device sessions

85. test_send_eth_from_wallet_to_address
Device sessions

86. test_send_stt_from_wallet
Device sessions

87. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

88. test_messaging_in_different_networks
Device sessions

89. test_collectible_from_wallet_opens_in_browser_view
Device sessions

90. test_insufficient_funds_wallet_positive_balance
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Apr 17, 2020

actually calling onHostDestroy when you press the back button, which stops the service, so I just made sure the service isn't stopped then. That means even if you kill the app the service will keep running.

@yenda Indeed all issues fixed, push notifications are working fine right now!

However, what happens is that even when I want to kill the app on Android with enabled Notifications - it resumes after opening without asking me to login to account. Disregard how many times I closed it.
And I keep seeing each 10 seconds in logcat


04-17 14:21:58.271  1596  1640 D ReactNativeJS: DEBUG [status-im.utils.handlers:32] - Handling re-frame event:  :mailserver/check-connection-timeout

So Close Status app actions (close it from the list of device apps) has no effect.
I'm sure we need to shut down if user closes Status from the list of device applications.

@yenda
Copy link
Contributor Author

yenda commented Apr 17, 2020

@Serhy you need to logout if you want to kill the app, it's not just an app now but also a service, and killing the app doesn't kill the service, otherwise it will be killed as well when you press the back button

@Serhy
Copy link
Contributor

Serhy commented Apr 17, 2020

I don't know it's OK from security point of view.
So having Notifications enabled - we always keep service alive and so Status is available to be opened without login any time (even no Save password / FaceID turned on) after user closed Status from list of apps.
And in that case we would need to align it to Notifications = OFF behavior then for consistency (so to update behavior of app NOT to kill the app if it closed)

@yenda
Copy link
Contributor Author

yenda commented Apr 17, 2020

It's different because with notifications you always have a notification opened that says the app is running even after you kill it.

@rachelhamlin
Copy link
Contributor

Understood that this is a necessity of serverless notifications.

What happens if I log out? Are notifications turned off? Do they have to be manually turned on again?

@yenda
Copy link
Contributor Author

yenda commented Apr 17, 2020

@rachelhamlin they are turned off until you login again

@Serhy
Copy link
Contributor

Serhy commented Apr 17, 2020

Yes, that's true

Screenshot 2020-04-17 at 16 40 17

This notification keep staying if I close Status.

Video of app behavior when notifications are ON: https://drive.google.com/file/d/1fRwmkYbB0nOBqP-KtTlDxO4gHHgBwG2T/view?usp=sharing

What happens if I log out? Are notifications turned off? Do they have to be manually turned on again?

Notifications turned off (means you close the service), but once open Status and login -> Notifications enabled again.

@andremedeiros
Copy link
Contributor

So, I understand this might be a bit too late to pull a change like this, but I'd like to suggest changing the "Don't kill the app" message to go somewhere else, maybe inside the app itself.

We have a moment, when we offer to enable notifications, to educate the user and to explain why notifications are the way they are, and the shortcomings and advantages. Doing things like this, despite it acting as a reminder, will ultimately, IMHO, be a disservice to users in general.

@hesterbruikman curious to hear your thoughts.

@hesterbruikman
Copy link
Contributor

I kind of like having the don't kill the app message shown by the OS as it's a system constraint to do with how you manage your apps not how you manage settings within Status. Counting on @errorists wisdom on this though.

@errorists
Copy link
Contributor

@hesterbruikman I don't have an opinion yet without having used it, I'm not familiar at all with Android notifications. Once this is out in the open and I and everyone else will get their feet wet, I'll be able to give informed advice. I definitely don't mind releasing it as it is here.

@Serhy
Copy link
Contributor

Serhy commented Apr 22, 2020

Thank you @andremedeiros @hesterbruikman @errorists !
There were no problems apart that question. Then lets merge @yenda!
It won't be included in upcoming release/v1.3 but enough time to polish if needed in v1.4.

yenda added 2 commits April 28, 2020 22:25
- only show notifications when app is in background
- open the user chat upon tap on notification
- remove chat from notifications on tap or dismiss notification
- keep the service alive on host destroy
- enable local notifications
fix for universal link not opening properly when app was closed with
back button, returning nil instead of the url

Signed-off-by: yenda <eric@status.im>
@yenda yenda merged commit 35dd4b0 into develop Apr 28, 2020
Pipeline for QA automation moved this from MERGE to DONE Apr 28, 2020
@delete-merged-branch delete-merged-branch bot deleted the notifications branch April 28, 2020 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

9 participants