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

Show notifications for replied messages and handle oreo quick reply actions #175

Merged
merged 30 commits into from Apr 14, 2021

Conversation

spuday90
Copy link
Collaborator

@spuday90 spuday90 commented Mar 7, 2021

closes #189

@spuday90 spuday90 requested a review from adeekshith March 7, 2021 04:47
@spuday90
Copy link
Collaborator Author

spuday90 commented Mar 7, 2021

Hi @adeekshith Please check on your device, on mine somehow getting 2 replies.

Copy link
Owner

@adeekshith adeekshith left a comment

Choose a reason for hiding this comment

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

Commented items and multiple replies needs to be fixed

&& remoteInputs.size() == 0 ) {
for(int x = 0; x < act.getRemoteInputs().length; x++) {
RemoteInput remoteInput = act.getRemoteInputs()[x];
if((remoteInput.getResultKey().toLowerCase().contains("reply")
Copy link
Owner

Choose a reason for hiding this comment

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

Using English word "reply" may not work for other languages

Copy link
Collaborator Author

@spuday90 spuday90 Mar 8, 2021

Choose a reason for hiding this comment

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

Well actually i realised we dont need to check "reply" as remoteInput object is available only for reply action

@adeekshith
Copy link
Owner

adeekshith commented Mar 17, 2021

@spuday90

  • Can we separate debug logs sharing code (cherry-pick)? It has external storage permissions so we might want to avoid that for now.
  • What issues are we having with constrained layout?

@spuday90
Copy link
Collaborator Author

spuday90 commented Mar 17, 2021

@spuday90

* Can we separate debug logs sharing code (cherry-pick)? It has external storage permissions so we might want to avoid that for now.

* What issues are we having with constrained layout?

In the latest commit( 3b1a322 ) we have removed external storage permission and moved the logs write to internal storage
With constraint layout spacing was coming between main fragment content and dismiss notification settings, i think we can use biasing to fix that but felt linear layout is better and faster in that case so changed it

@adeekshith
Copy link
Owner

Also keeping the notification after reply only seems to be working for Whatsapp

@spuday90
Copy link
Collaborator Author

Also keeping the notification after reply only seems to be working for Whatsapp

Oh!, have to debug which reply intent it is taking

@adeekshith
Copy link
Owner

Also keeping the notification after reply only seems to be working for Whatsapp

Oh!, have to debug which reply intent it is taking

I think manually replying to facebook via notification also dismisses it so not really app's fault

@adeekshith
Copy link
Owner

@spuday90 conflicts

@adeekshith
Copy link
Owner

adeekshith commented Apr 4, 2021

@spuday90 strings.xml and arrays.xml needs to be checked too. they replaced strings in main branch if not conflicting. I doubt if this branch is even compiling

Copy link
Owner

@adeekshith adeekshith left a comment

Choose a reason for hiding this comment

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

  • Needs to be updated with latest "main" (merge/rebase)

  • Resolve conflicts with main

  • Fix strings.xml and arrays.xml if not already done

  • Remove logging to file code

  • Notification Setting

    • Remove "Oreo+ only" if it works on previous ones also
    • Move setting to "Settings activity"
    • Change switch label to "Dismiss replied notifications"
    • Remove help tip below the switch ("Turn On to dismiss...")

…ssue/134/autoreply-not-working-onfew-devices

� Conflicts:
�	app/src/main/java/com/parishod/watomatic/NotificationService.java
@adeekshith
Copy link
Owner

I see this in the latest branch with Watomatic attribution enabled

Screenshot_20210405-173150_WhatsApp.jpg

@adeekshith
Copy link
Owner

Also clicking on Notification button is behaving like "Share" button. Is this happening only on mine?
Tried deleting local branch and pulled latest.

notification-btn-share.mp4

@adeekshith
Copy link
Owner

  • Watomatic notification icon too small. Let me know if it needs anything done from from me end.
  • Can we make it normal ("Alert" or similar) notification instead of Silent notification?
  • WhatsApp original notification is still present. Should we dismiss that?

Screen Shot 2021-04-05 at 5 48 22 PM

@spuday90
Copy link
Collaborator Author

spuday90 commented Apr 6, 2021

Also clicking on Notification button is behaving like "Share" button. Is this happening only on mine?
Tried deleting local branch and pulled latest.
notification-btn-share.mp4

I completely removed share code in latest commit, so it should have crashed instead
If something was missed while removing that

@spuday90
Copy link
Collaborator Author

spuday90 commented Apr 6, 2021

* Watomatic notification icon too small. Let me know if it needs anything done from from me end.

* Can we make it normal ("Alert" or similar) notification instead of Silent notification?

* WhatsApp original notification is still present. Should we dismiss that?
Screen Shot 2021-04-05 at 5 48 22 PM
  1. For notification icon I have used the foreground one for now, we should generate actual notification icon, or we can use app icon, App icon will look fine in status bar but when status bar pulled down then icon will look greyed out.
    2.Yes we can change silent notification to standard notification
    3.Yes we should dismiss whatsapp notification, as for other apps it is anyhow dismissing so itll be consistent

@adeekshith
Copy link
Owner

Have you seen this happening?
I am getting multiple replies on this branch
Screenshot_20210406-091641_WhatsApp.jpg

@@ -55,8 +55,17 @@
<string name="watomatic_github_url" translatable="false">https://github.com/adeekshith/watomatic</string>
<string name="watomatic_wato_message_url" translatable="false">https://www.reddit.com/r/watomatic/comments/lrkn7j/fellow_watos_share_your_creative_wato_message/</string>

<!-- Share debug logs -->
<string name="app_logs_file_name">WatomaticLogs.txt</string>
Copy link
Owner

Choose a reason for hiding this comment

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

@spuday90 Mark all share debug logs as translatable="false"

<!-- keys and app internal strings -->
<string name="key_pref_app_language" translatable="false">pref_app_language</string>
<string name="pref_show_notification" translatable="false">pref_show_notification</string>
Copy link
Owner

Choose a reason for hiding this comment

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

pref_show_notification -> pref_show_notification_replied_msg for value to future proof (but optional)

@adeekshith adeekshith changed the title handle oreo quick reply actions Show notifications for replied messages and handle oreo quick reply actions Apr 13, 2021
@adeekshith
Copy link
Owner

adeekshith commented Apr 13, 2021

@spuday90 Approved this but I am still seeing these:

  • Notifications are silent
  • Clicking on notification is not opening any app

I remember you fixing it before but not sure. If that is not fixed, we can merge this PR and file an issue.

@adeekshith adeekshith merged commit db15a9e into main Apr 14, 2021
@adeekshith adeekshith deleted the issue/134/autoreply-not-working-onfew-devices branch April 14, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not dismiss notification after auto reply
2 participants