Git Product home page Git Product logo

Comments (6)

quarck avatar quarck commented on July 27, 2024

Some improvements for this were added in f64cf24, not a full fix yet

from calendarnotification.

quarck avatar quarck commented on July 27, 2024

I've spend quite a while researching ways how to fix this problem. It seems to be a limitation of android itself, so unlikely it can be done, all activities started from notification are behaving the same way.

In the documentation about notifications & navigation Google is always mentioning "return home" rather than "return to previous app activity":
http://developer.android.com/guide/topics/ui/notifiers/notifications.html#NotificationResponse

So would close as wontfix for now. If someone can point me to an example of the app that can do similar trick - it would be a great help.

from calendarnotification.

quarck avatar quarck commented on July 27, 2024

The old Calendar Snooze (https://play.google.com/store/apps/details?id=com.bitfire.development.calendarsnooze) used to behave as required, but I think the way the Calendar Snooze reminder worked was more like an app forcing its way into the foreground, so when you snoozed or dismissed, it just closed and hence the previous app remained.

It's not a big deal given how good CalendarNotification is now a few of the early bugs have been removed.

from calendarnotification.

quarck avatar quarck commented on July 27, 2024

It looks like that implementing this would be conflicting with #3.
With old Calendar Snooze app, snooze dialog stays in the task switcher after event was snoozed. For Calendar Notifications Plus users have requested that Snooze dialog should disappear completely after event was snoozed, so to get event completely out of sight. To implement this behavior, Snooze dialog (activity) has special flag "no task history", which probably causing behavior described in #18.
So it is either one or another.

Alternative solution - is to not use Intents, but use low-level overlay to draw on top of current window without actually creating any new activities. This would require quite a lot of work and might be not very reliable, as well as would require some "suspicious" permissions - users might dislike it.

Another possibility - create two Snooze Activities (they could derive from the same base class, so 99% of code would be shared), one with "no task history" flag and another without, Depending on user preferences he could have either #3 or #18 (this) working.

from calendarnotification.

quarck avatar quarck commented on July 27, 2024

Update: did a little bit of de-compiling of Calendar Snooze, it seems to be using all standard ways for creating activities, so nothing special on it side, no special flags, just pure "Android 1.6" depricated API. So it is very probable that behavior of Calendar Notifications Plus is caused by the fact that Snooze activity is hidden from "recents".

from calendarnotification.

quarck avatar quarck commented on July 27, 2024

Adding

        intent.action = Intent.ACTION_MAIN;
        intent.addCategory(Intent.CATEGORY_LAUNCHER);

did the trick

from calendarnotification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.