Switching apps loses the screen (Scene)

258 views
Skip to first unread message

Paddy Landau

unread,
Aug 19, 2016, 8:33:01 PM8/19/16
to Tasker
Suppose that I'm working on an app (e.g. the browser). If I switch to another app (e.g. check a text), afterwards I can return to the first app where I left off.

But I can't do this with a Tasker app. As soon as I switch to another app, when I try to return to the Tasker app, the Scene is gone. All progress is lost.

Have I made an incorrect setting, or is it a bug with Tasker?

Rich D

unread,
Aug 21, 2016, 8:24:17 AM8/21/16
to Tasker Google Groups Post


>
> Have I made an incorrect setting, or is it a bug with Tasker?

Not sure but I assume there needs to be something added to the manifest so your launcher will add your app to the recent list. This can only be done by Pent adding this option to the app factory.  

A work around is to launch the app with a Tasker 'launch app' action making sure the 'exclude from recent apps' option is not checked.   You can use a task shortcut on your home screen to start a task that launches the app.

Paddy Landau

unread,
Aug 21, 2016, 7:51:43 PM8/21/16
to Tasker
@Rich D, thank you for your reply.

You mentioned a manifest. I know nothing about manifests. Could this be an option added when exporting as an app? Export > As App > Advanced Configuration > Extra Permissions.

I might be talking nonsense, of course. As I say, I'm unfamiliar with this technical side.

Your workaround unfortunately doesn't work for me. However, I've found that when I restart the app, it continues from where I left off. (It doesn't work when started directly from Tasker, which was how I was previously doing it.)

So there is that, at least. It's inconvenient, but it's a workaround.

I hope that Pent is able to fix this.

Rich D

unread,
Aug 22, 2016, 6:35:03 AM8/22/16
to Tasker Google Groups Post


> You mentioned a manifest. I know nothing about manifests.

My knowledge on this subject is very limited as well. This is just speculation on my part.

Could this be an option added when exporting as an app? Export > As App > Advanced Configuration > Extra Permissions.

No, permissions are different.  

> Your workaround unfortunately doesn't work for me.

Perhaps it is the way to scene the shown.  I am using activity full display no bar

However, I've found that when I restart the app, it continues from where I left off. (It doesn't work when started directly from Tasker, which was how I was previously doing it.)
>

Do you mean starting your app with Tasker or
Running your project from Tasker before exporting it ?

Paddy Landau

unread,
Aug 22, 2016, 7:28:44 AM8/22/16
to Tasker
Thanks again for your replies, @Rich D.

Perhaps it is the way to scene the shown.  I am using activity full display no bar


I've tried that, but no success. Perhaps you have a different version of Android? I'm running 6.0.1.
 

Do you mean starting your app with Tasker or
Running your project from Tasker before exporting it ?

  • If I start from Tasker (without exporting as an app), I cannot restart from where I left off. Leaving the screen seems to destroy the task.
  • If I export as an app, install it, and then run it, it will restart from where I left off, even though it does not show up in the Recent List.
I have tested this with:
  • Dialog, Dim Behind
  • Activity, Full Window
  • Activity, Full Window, No Bar
Also, if there is a screen covering another (in my case, a Dialog covering an Activity), starting the app restarts (from where I left off) only the Dialog. When the Dialog closes, it's back to the Android home screen. Fortunately, starting the app again restarts the Activity screen from where I left off.

So, the workaround exists, but it is inconvenient when switching between apps for research! It also makes for an unprofessional finish.

Rich D

unread,
Aug 22, 2016, 7:56:46 PM8/22/16
to Tasker Google Groups Post


>> Perhaps it is the way to scene the shown.  I am using activity full display no bar
>
>
> I've tried that, but no success. Perhaps you have a different version of Android? I'm running 6.0.1.
>  

After further testing I was incorrect. My app factory app does not appear in the recents  list.  My app starts another app (quick plc) and while in quick pic I can hit the back button and return to my app. This is different from what you are doing. I have a pixel c tablet  /  Android 6.0.1  /  Tasker  Version: 4.8u5m and it behaves exactly as you describe. It looks like we will just have to live with this for now as I did find this post from pent...

Regarding the recents list, app factory apps are explicity excluded from it
due to
difficulty in handling it issues that crop up from that.

Pent
answered Feb 11 2016 at 00:09 by Pent



Jay M

unread,
Aug 22, 2016, 9:15:35 PM8/22/16
to Tasker Google Groups Post

Damn that Pixel C is one sexy bit of kit http://www.express.co.uk/life-style/science-technology/625211/Google-Pixel-C-Best-Android-Marshmallow-Tablet-UK-Price-Release-Date


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
--

Jay M ︻芫══一

Rich D

unread,
Aug 23, 2016, 5:33:42 AM8/23/16
to Tasker Google Groups Post

Jay M

unread,
Aug 23, 2016, 6:23:23 AM8/23/16
to Tasker Google Groups Post

i was tempted to get 1 until i saw the keyboard price.


On Tue, 23 Aug 2016, 10:33 Rich D, <ricp...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Paddy Landau

unread,
Aug 23, 2016, 7:08:30 AM8/23/16
to Tasker
…  as I did find this post from pent…

Well discovered! For future reference, I'm putting the link to that thread in this post:

It's a shame, though. I've asked on the other thread if Pent has found a solution.

Damn that Pixel C is one sexy bit of kit

Um… I don't understand what this has to do with the thread?

Jay M

unread,
Aug 23, 2016, 8:08:59 AM8/23/16
to Tasker

It doesnt have anything to do with it really except Rich mentioned he owned it i got curious what it was as im after a new tablet myself. I searched for it found it thought it was sexy decided to post a link to it just incase anyone else was curious or looking to buy a tab. Anyways its no big deal im sure Pent will remove it but he would be wasting his time its done and dusted and were back on topic now.


--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Paddy Landau

unread,
Aug 25, 2016, 10:22:28 AM8/25/16
to Tasker
I spoke too soon. What happens is that when I restart the app, it seems to have a mix of a new state and the previous state. The results are an inconsistent mix.

I only discovered this after I added a new screen.

So, unfortunately, my workaround doesn't work!

The only workaround, then, is for the app to constantly remember its state so that it will restart from where it left off. This makes creating an app horrendously complicated especially if there is a time-sensitive component.

It makes Tasker unusable for any but the simplest of applications. :(

@Pent, if you see this, please try to fix it, even if it only works when exporting as an app.

Rich D

unread,
Aug 25, 2016, 12:24:45 PM8/25/16
to Tasker Google Groups Post


> I spoke too soon. What happens is that when I restart the app, it seems to have a mix of a new state and the previous state. The results are an inconsistent mix.

Could you give a example of what data is lost?  I have several tasker apps and have never had any lose  of data when going in and out of the app.  You just need to test the scene to see if it is uncreated before trying to show it.

Paddy Landau

unread,
Aug 25, 2016, 1:04:38 PM8/25/16
to Tasker

Could you give a example of what data is lost?


Perhaps I'm not explaining myself well (I am finding it a bit difficult to explain clearly). Let me try with detailed bullet points.

In this context:
  • I am talking about an app that I created in Tasker and then exported as an app; it isn't something that I run directly from Tasker itself.
  • This app has several scenes, so there is a progression that can involve looping.
  • When a scene is shown, the task that shows it ends. The user presses a button on the scene to call the next task to be run (which will display a new scene).
Now, suppose that a scene is being displayed. However, instead of pressing a button, now I switch to some other unrelated app, e.g. the browser.
  • The Tasker app's scene can no longer be seen in the Recent Apps view.
  • If I restart the Tasker app (by choosing the app's icon), one of three things will happen depending on something — but I don't know what that something is.
    1. The app picks up from exactly where it left off, i.e. showing the last scene and continuing properly when I press a button.

    2. The app restarts from the very beginning as if it had been killed.

    3. The app restarts from the very beginning, but when its scene disappears (because I press a button), the scene from before I left off is shown (instead of the correct scene next in sequence).
The first result is as it should be, always (unless Android kills the task). The second is irritating and problematic, but at least it can be understood. The third is plain baffling, and potentially can lead to data corruption.

I haven't figured out a pattern to this behaviour. I'll keep trying to spot a pattern, and if I manage, I'll post again here.
Message has been deleted

Michael Hill

unread,
Oct 9, 2016, 5:50:48 PM10/9/16
to Tasker
I know this post has died a couple months back, but any new news from Pent when or IF app factory apps will be able to be shown in the recent apps list?

Paddy Landau

unread,
Oct 10, 2016, 4:54:37 AM10/10/16
to Tasker
Pent has not since replied to either this thread or the other one. I suspect that this problem will not be fixed.

I worked around the problem by having the app always remember where it left off. A benefit of this is that the app will correctly resume even after a phone restart. The drawback is greatly increased complexity.

You might want to ask on the other thread, so that Pent is aware that people are still interested:

https://groups.google.com/forum/m/#!topic/Tasker/Rs5zys3GxL0

Michael Hill

unread,
Oct 10, 2016, 8:24:42 AM10/10/16
to Tasker
Just posted there, thank you.

Scott Almond

unread,
Oct 12, 2016, 6:05:25 AM10/12/16
to Tasker
Seems from your explanation above, that your launch task is not performing any checks prior to launching your scene. this will confuse your app if you are not saving settings to variables and checking what scenes are already open/hidden when launching the app again.

i.e, When I launch my app, the launch task first checks to see if any of my apps scenes are "Hidden" (this is the state a scene will take if you launch another app without specifically killing your custom Tasker app). Then Depending if the check returns true or false, I kill the current scene and launch the first app scene followed by filling in its settings from saved variables, or bring the "Hidden" scene back into focus which should return with its existing settings so long as it wasn't killed instead of hidden. if it was killed, then showing the scene needs to be followed by population its settings from backed up variables.

Variables should be created/filled in for everything when you change options in your app via scene interactions. Then you are responsible for ensuring these variables re-populate your scene when you launch it again, not Tasker.

Tasker doesn't automatically take care of all these little things, its something the developer has to account for and design there app accordingly.

Paddy Landau

unread,
Oct 12, 2016, 7:15:57 AM10/12/16
to Tasker
Scott, I hear what you say, and that is just what I've done (but slightly simplified) to work around the problem.

It still doesn't solve the problem that the last scene disappears from the recent apps list, though, and I'd love that to be fixed.
Reply all
Reply to author
Forward
0 new messages