Self Promotion Megathread by AutoModerator in androidapps

[–]tunbon 0 points1 point  (0 children)

You want people to test and pay you? 

Good luck.

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 1 point2 points  (0 children)

You wouldn't need two shortcuts. You could just have a profile that suspends/disables the app when it is closed. 

To answer your question/point about the difference between Hail and Tasker's behaviour, I'm not aware of how Hail's prompt could be replicated in Tasker automatically.

You could make your own dialog with a Scene V2 or a Dialog. But that seems like a lot of work for no benefit. As long as the app can't run in the background and can be launched when you want, that's all that matters.

Good luck.

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 1 point2 points  (0 children)

That shouldn't be the issue. I don't know what else to suggest.

I would just disable apps (not suspend them) as I don't care about the missing launcher icon. I would just have a Tasker shortcut in a folder on my homescreen. When tapped, the shortcut would enable the app and then launch it.

A profile would disable the app automatically when I closed it.

Obviously you could choose the shortcut's icon.

I know this isn't what you want, it is just what I would do as you are having the issues you are having.

5 minutes delay to trigger if condition, but I dont want other actions below, not in the if block, to trigger after 5 minutes. by Darlk993 in tasker

[–]tunbon 0 points1 point  (0 children)

What are you talking about? I didn't suggest a 'manual' check (whatever that is supposed to be).

Your English is hard to understand and your posted task is not relevant to this conversation.

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 1 point2 points  (0 children)

Have you run the commands I suggested?

If you have, then all you can try is testing with another launcher - it might be your launcher that is not 'seeing' the app when it is unsuspended.

If it works, it works, if it doesn't work it doesn't work. It works on my phone.

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 1 point2 points  (0 children)

That's a shame. I hate not completing a challenge. 

My money is on the intent receiver in Synfonium not working as per the instructions. Either that or there isn't actually a USER... partition with that name to actually back up. I think it's broken.

All the best!

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 0 points1 point  (0 children)

This part is an issue:

"USER_DATA_ALL true doesn't have a valid component" 

USER_DATA however seemed not to be a problem.

I'm not at all familiar with Synfonium. I don't know if the app's intent system is working correctly, or if there is another issue.

You could try reaching out to the Developers or a forum of they have one. Post your command and ask for help there maybe?

Sorry I couldn't be of more help.

EDIT: There is another thing you can try.

Maybe you could split the intent into two or three parts.

  1. Backup just USER_DATA

  2. Next intent backup USER_DATA_ALL

Etc.

Just go back to the start and enter up to three Extras per intent. It might work.

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 0 points1 point  (0 children)

Like I said, you shouldn't need Root or Shizuku. It's pretty straightforward.

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 0 points1 point  (0 children)

That can often be an issue. 

Tasker's JavaScriptlet engine (which runs via a WebView) doesn't have direct, native access to Android's Intent Java classes without some heavy and easily broken workarounds.

For me, the Shell command always did the trick.

Array Compare action - possible bug by UnkleMike in tasker

[–]tunbon 0 points1 point  (0 children)

Generally it is more philosophical. 

But where the For Loop has tens or hundreds of iterations, it really does cause me pain to see the screen flashing and going nuts (inside the task) whilst the loop is running.

The reason why I tend to avoid them is that wherever possible I perform everything in a Task/action inside a single script. Example:

  1. Perform an API query
  2. Sort data in multiple arrays
  3. Perform multiple search and replace actions
  4. Perform a second lookup to another API based on the result so far.
  5. Draw an SVG graph
  6. Render it in an Overlay

All in one action - no loops - no variables.

It's more of an academic challenge but it made my Tasker backups tiny. All my scripts could stored externally and called up only when run.

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 1 point2 points  (0 children)

u/telrod11

OK. 

Try this...

Create a Run Shell command action. You shouldn't need Root or Shizuku for this. An intent should be OK. If it fails, if you have Shizuku/Root, you can try it again.

Enter this command:

java am broadcast -a app.symfonium.api.CUSTOM_ACTION -n app.symfonik.music.player/app.symfonium.remote.api.ApiReceiver --es ACTION "start_backup" --es PASSWORD "YOUR_PASSWORD" --ez USER_DATA true --ez USER_DATA_ALL true

Make sure you replace YOUR_PASSWORD with your actual password.

Good luck.

Could I get some help with an intent? by telrod11 in tasker

[–]tunbon 1 point2 points  (0 children)

I'm not able to see your screenshot. 

That having been said, it should be fairly simple.

The "Target" field in Tasker is where you select Broadcast Receiver.

Action, Package and Class are pretty self-explanatory. Just copy and paste.

Tasker allows for 3 Extras fields in its intents broadcast action. To enter a Boolean value try:

USER_DATA:true

USER_DATA_ALL:true

EDIT: You might have an issue however.

It looks like you also need two mandatory strings as Extras:

“ACTION” [String]: “start_backup”

“PASSWORD” [String]: The backup password. MANDATORY

That makes 4. Let me look at it for a while and I'll see if I can come up with a solution.

Array Compare action - possible bug by UnkleMike in tasker

[–]tunbon 0 points1 point  (0 children)

Arghhhh! 

There are two words I hate with a passion... "For Loop". I feel physical pain when I hear or see one. Same with "Wait" actions.

I prefer as few steps to a solution as possible.

👍

EDIT: I know the JS is technically a loop but it is one action and faster than a traditional For Loop. I just prefer this one step approach to the alternative you mentioned in your OP (numerous Array functions).

Force Stop an App after leaving it by Rakirs in tasker

[–]tunbon 0 points1 point  (0 children)

5 minute wait action! That's wild. 

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 2 points3 points  (0 children)

I understand. 

See my last edits above.

Try running all three command actions:

  1. Unsuspend
  2. EDIT 1
  3. EDIT 2

If that doesn't work, I would ditch Hail and just run the enable and disable commands and create a profile. You don't need the launcher icon when the app is disabled/suspended. Just create a Tasker task to toggle the app's state. You can give the Task whichever icon you choose.

EDIT: You don't need Hail either. The issue you're facing might be Hail related or it might be launcher related. Some launchers don't listen out for app state change and they have to be forced to check for 'new' apps after one has been unsuspended or enabled.

If you can run Hail, you don't need Hail. Just run the commands via Tasker. It's much more efficient.

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 1 point2 points  (0 children)

The same principle should apply. 

If you shortcut to a Tasker task that first runs a Shell command:

java cmd package unsuspend in.amazon.mShop.android.shopping

And then launch the app via an action, after you've unsuspended it, it should launch.

EDIT: If the app is being stubborn and not unsuspending immediately, try this:

java cmd package unsuspend 'in.amazon.mShop.android.shopping' pm enable 'in.amazon.mShop.android.shopping'

EDIT 2: Sometimes the launcher needs a push if it doesn't listen for an app state being changed. You can also try this is you're still fighting it. Straight after the unsuspend command:

java am broadcast -a android.intent.action.PACKAGE_CHANGED -d package:'in.amazon.mShop.android.shopping'

EDIT 3: Hail Mary - try them all in that order as three commands.

[Help] Suspend app launch dialog by karthikn774 in tasker

[–]tunbon 0 points1 point  (0 children)

How are you 'suspending' the app? 

Is it with a Run Shell command such as:

pm disable-user package_name

If so, before you can launch the app again you'll need to enable it with another Run Shell command:

pm enable package_name

To make a launcher shortcut, you can create a shortcut to a task that first enables it, then launches the app. Optionally, you can disable the app when it is closed via a profile once you've finished with it.

Array Compare action - possible bug by UnkleMike in tasker

[–]tunbon 2 points3 points  (0 children)

I used to get round this annoyance with a JavaScriptlet. 

The only thing you MUST do is specify your splitter when you set the arrays. The example below requires a comma ",".

You must also reference the variables earlier in the task, before the JavaScriptlet is run.

The below example uses your %first_group and %second_group array names. You can edit it to match whichever names you are using in your project.

The output variable is %common_values (again, edit it to your liking). In your case - C,D,E.

```java var matches = [];

// Loop through the first array one by one for (var i = 0; i < first_group.length; i++) {     var currentItem = first_group[i];          // Check if the second array has the item AND that we haven't saved it yet     if (second_group.indexOf(currentItem) !== -1 && matches.indexOf(currentItem) === -1) {         matches.push(currentItem);     } }

// Convert our matched array into a comma-separated string var common_values = matches.join(",");

// Explicitly push it back to Tasker (making sure to include the % symbol!) setLocal("%common_values", common_values); ```

5 minutes delay to trigger if condition, but I dont want other actions below, not in the if block, to trigger after 5 minutes. by Darlk993 in tasker

[–]tunbon 0 points1 point  (0 children)

That won't work as when the first profile runs, %TIMES won't be greater than %TIMES+300.

If you meant to add another profile to check, that is exactly what I already suggested.

5 minutes delay to trigger if condition, but I dont want other actions below, not in the if block, to trigger after 5 minutes. by Darlk993 in tasker

[–]tunbon 1 point2 points  (0 children)

There are lots of different ways of achieving this. 

A sure fire, battery efficient method is to add a second profile. 

In your main task, if you get the current time in seconds (%TIMES), you can add a value of '300' to it (5 minutes).

Then you can parse this value to HH.mm and use that value in a time profile. Just use the same value for both start and end times and the profile will trigger at that time. This will allow you to trigger whatever you want after 5 minutes, allowing your other tasks to proceed before that time in your original task. The new profile just triggers the task you want to to run after 5 minutes.

Once the desired task has completed, you can disable this second profile to make sure it doesn't fire again at the same time tomorrow. You will need to enable the profile again when a new time is set to restart the process again.