topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday October 4, 2024, 5:12 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Again - Small Android Utility to Resume / Launch the "Last" Activity  (Read 13474 times)

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
What

Attached, please find Again - a small Android utility to resume / launch the "last" / "previous" activity.

Why

I wanted a quicker way to switch back to a previous activity after I'd interacted with a home screen widget.  This is possible via the Task Switcher, but I felt it took more steps than necessary -- especially when done repeatedly.

When

When one's home screen is visible and you want to "return" to the previously running activity.

How

After installation, place a launcher icon for Again on your home screen.

To use, launch Again.

Notes

The home screen is also an activity as is the dialog that appears to give one a choice as to what application to launch -- but I didn't want these launched so Again tries to avoid launching these.



md5:421c54f705910fbeca8e4620d7a4a630
sha1:6c6c83cf79a93b6c242ebe1eb55cc2bdb678c63e

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,913
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #1 on: September 11, 2013, 07:05 AM »
It's great to see you sharing an Android utility you've written!

I don't have an android device but this sounds pretty darn useful.

Deozaan

  • Charter Member
  • Joined in 2006
  • ***
  • Points: 1
  • Posts: 9,759
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #2 on: September 11, 2013, 01:21 PM »
It works as advertised (as far as I can tell) on my Nexus 7 Flo (2013). But I don't understand the point. The Task Switcher takes only two clicks/taps/touches to launch the previous activity. One to open the list of recently used apps, and one to launch the one you want. And since the previously used activity is always in the same position, it's not hard to rely on muscle memory to make it quick and "automatic" to the brain/body.

"Again" takes only one click/tap/touch at best, but possibly two or more if the icon isn't on the current "page" of your home screen you're viewing, so there might not be any benefit at all to using it.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #3 on: September 11, 2013, 06:19 PM »
Thanks for trying and the comments.  Much appreciated!

In my case for other reasons I decided to only have one home screen page -- having to possibly switch to another page after a tap ended up not being worth it for me.  I was in to the idea of making utilities for the notification shade, but I realized I couldn't control the order -- which meant that I'd likely have to spend time searching for my target due to ordering being variable.  A single home screen page arranged to one's liking means that there is potentially no searching once you reach it -- assuming you've remembered where things are, once you reach the single home screen page there is no "now where is my target?" experience.

These points have to do with "flow" -- I've found that when in the midst of some course of action having to do too many inessential steps can be quite counterproductive (e.g. I have forgotten what I was up to on occasion).  Using the Task Switcher requires another unnecessary step too and is an example of this.

I also use Quickdroid to mitigate the issue of lack of real estate on a single home screen page -- but this has turned out to be fine in my case.

I understand this kind of arrangement is not likely for every one.

Does this make sense?



As an additional point, there are some devices that have home screen apps that allow you to place certain icons on a "band" that "follows" you when you switch home screen pages so certain icons are always available.  That band is a good potential location for Again for folks with multiple home screen pages.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #4 on: September 12, 2013, 01:34 AM »
thanks, it works on my S890 (Android 4.1.1).

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #5 on: September 12, 2013, 01:40 AM »
Thanks for trying and the report on how it went :)

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #6 on: September 14, 2013, 02:17 AM »
just want to report a little incident.. after accidentally exiting Aldiko, i tapped on 'Again' to launch Aldiko. however 'Again' crashed and went on a loop of re-launching 7-8 previously launched apps. i assume 'Again' reads from a saved list of previously opened apps. is there a way to reduce this cache?

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #7 on: September 14, 2013, 05:28 AM »
Thanks for the report -- I don't suppose you can view your device's log...may be you know this already, but for the not-the-most-recent versions of Android (I think pre-4.1.x), one can view the device's log with tools like alogcat.

Again uses getRecentTasks.  IIUC, that's information maintained by the system.

When you say "went on a loop of re-launching", do you mean that when you invoked Again once, it tried to re-launch multiple times?



BTW, what version of Aldiko are you using?
« Last Edit: September 14, 2013, 05:46 AM by ewemoa »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #8 on: September 15, 2013, 10:04 PM »
When you say "went on a loop of re-launching", do you mean that when you invoked Again once, it tried to re-launch multiple times?



BTW, what version of Aldiko are you using?

there was a prompt saying that 'Again' has stopped working and when i pressed the 'ok' button, the previously launched apps were launched one after another. in hindsight, should have read the contents of the crash message.

as for aldiko, i am using version 2.2.3

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #9 on: September 16, 2013, 09:08 AM »
Thanks for the clarification.  I'm quite puzzled as to how that might have happened -- haven't seen that sort of behavior here.  I hope I can reproduce this reliably at some point...

That's the version of Aldiko I tried to reproduce with...unfortunately, no luck so far.

If you don't mind sharing the info, is your version of Andrroid pre-4.1.x?

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #10 on: September 17, 2013, 05:03 AM »
Thanks for the clarification.  I'm quite puzzled as to how that might have happened -- haven't seen that sort of behavior here.  I hope I can reproduce this reliably at some point...

That's the version of Aldiko I tried to reproduce with...unfortunately, no luck so far.

If you don't mind sharing the info, is your version of Andrroid pre-4.1.x?

i don't mind at all, here's a screenie.
Spoiler


since it only happened once, maybe some other apps that were running in the background caused it.

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,922
    • View Profile
    • Donate to Member
Re: Again - Small Android Utility to Resume / Launch the "Last" Activity
« Reply #11 on: September 17, 2013, 07:25 AM »
Thanks for the info.

Unless you have root, I don't know how to get at relevant logs (if it happens again) with the current version of Again.

May be I should figure out how to built that sort of thing in to a future version :)