akvo / akvo-flow-mobile

Akvo Flow app
GNU General Public License v3.0
18 stars 16 forks source link

When notifications have long text, only one line is shown #519

Closed valllllll2000 closed 7 years ago

valllllll2000 commented 7 years ago

We should show all the lines by using a different notification style: .setStyle(new Notification.BigTextStyle().bigText(longText))

janagombitova commented 7 years ago

Here is an old issue https://github.com/akvo/akvo-flow-mobile/issues/125 that is a duplicate. Let's continue with the implementation here.

valllllll2000 commented 7 years ago

Applying the big text style only works stating android api 4.1, before that we have 2 options: 1) Make the text shorter 2) Use custom view to display the notification. Will try this and see how it actually looks.

valllllll2000 commented 7 years ago

After multiple attempts, using custom views does not seem to work so I would suggest to make the error string shorter instead of <string name="error_assignment_text">Assignment in Akvo FLOW dashboard required</string> replaced by <string name="error_assignment_text">Assignment in FLOW dashboard required</string> The second version does not get cut off.

janagombitova commented 7 years ago

@valllllll2000 can the error say: "Assignment required" or is that too short?

valllllll2000 commented 7 years ago

It could be fine but depends on the users, will they know what it refers to? Or maybe how about 'User assignment required' or 'Flow user assignment required' or 'Dashboard user assignment required' we would have to replace dashboard by the new name

janagombitova commented 7 years ago

That is a good point. Then either your: "Assignment in Flow dashboard required." or "Flow dashboard assignment required"

We do not link the assignments to users yet but to devices so that can get confusing. You can also leave the word 'dashboard' out and then we will not have to switch the word dashboard for the "new" one.

valllllll2000 commented 7 years ago

I like "Flow dashboard assignment required" even shorter!

valllllll2000 commented 7 years ago

Test plan:

Download manually a monitored survey on you device via the settings. Try syncing it. You should see the error notification. It should be visible entirely or if not there should be a way to expand it. (On latest phones with android 7.0 press the little arrow inside the notification).

valllllll2000 commented 7 years ago

The translations will need to be reviewed once this issue is merged

janagombitova commented 7 years ago

Looking at this particular notification case, the implementation passes the test plan. There are more cases where we need to tackle the length of the message, see https://github.com/akvo/akvo-flow-mobile/issues/526#issuecomment-266408577

janagombitova commented 7 years ago

@valllllll2000 all right. I have copied the image to this new issue https://github.com/akvo/akvo-flow-mobile/issues/560

This implementation is ready for release 👍