Giter VIP home page Giter VIP logo

Comments (10)

whitecat avatar whitecat commented on July 19, 2024

Can we get a little more detail on this? When do you want to force stop syncing?

from comicreader.

applications4android avatar applications4android commented on July 19, 2024

When sync is in progress and is taking a lot of time (or is hung), then there should be option to stop sync.
Currently stopping this is possible only by stopping application in a task manager app.
Something like long click on notification will give a pop up to stop syncing, or a stop button in the notification itself.

from comicreader.

whitecat avatar whitecat commented on July 19, 2024

I have done some review of this I cannot find any tutorial to do long press identification. I have a stackoverflow bounty on this: http://stackoverflow.com/questions/7003592/android-catch-events-on-notification-long-press.

We can also implement buttons but they are pretty ugly: The second answer http://stackoverflow.com/questions/10516722/android-notification-with-buttons-on-it

I was looking at my phone today, on android 4.2, and when the alarm went off it had an option in the notification bar: snooze and disable. I didn't find online how to create those buttons.

from comicreader.

applications4android avatar applications4android commented on July 19, 2024

Yup! Even I tried to do some research of my own and couldn't find any helpful pointers on this.
Agree. IMO, buttons on notifications are ugly.

from comicreader.

whitecat avatar whitecat commented on July 19, 2024

I think just clicking on the notification should open the app and pop up a dialogue, "would you like to cancel sync?" Cm does that with their download notification.

from comicreader.

applications4android avatar applications4android commented on July 19, 2024

Just a thought - since now there is an option of disabling display of notifications, force closing sync for those people who have disabled this wouldn't be possible.

from comicreader.

applications4android avatar applications4android commented on July 19, 2024

Popup dialog in app looks a good solution though.

from comicreader.

whitecat avatar whitecat commented on July 19, 2024

I will add it to menu. Stop sync. Which pops up would you like to stop syncing?

from comicreader.

applications4android avatar applications4android commented on July 19, 2024

I was referring to your suggestion only "clicking on the notification should open the app and pop up a dialogue".

from comicreader.

whitecat avatar whitecat commented on July 19, 2024

I did a brute force way. suggested here with inturrupts checking often in code:
http://stackoverflow.com/questions/7355499/how-to-cancel-service-intentservice-asynctask-looper

I added a menu button because, I didn't know how to do the pop up dialogue. Will submit code tomorrow.

from comicreader.

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.