EAP version 1.36.0-dev

Forum to discuss everything related to the current development build of Automagic.

Moderator: Martin

Locked
User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

EAP version 1.36.0-dev

Post by Martin » 31 May 2018 09:02

This forum is used to give interested users access to the next version of Automagic currently in development.
The early access version is only lightly tested and might still contain serious bugs. The quality of EAP versions can at times be even way below usual beta standards.

:arrow: Use at your own risk!
:arrow: Ensure to create a backup before you install an EAP version.

Important:
  • The EAP version will replace the Google Play version of Automagic on your device. Flows opened, saved and created with the EAP version will usually not be compatible with old versions of Automagic so it is highly recommended to create a backup of your flows, widgets and variables before you start using the EAP version (create a backup of the folder /<sdcard>/Automagic)
  • Unknown sources needs to be enabled in the settings of Android to install the EAP version.
  • Please report bugs and problems found in the EAP version in the EAP forum or by mail to info@automagic4android.com
  • :!: Don't share flows created using the EAP version in the regular flow sharing area since users of the released Automagic version will not be able to use the new triggers, conditions and actions. Feel free to share flows in the EAP forum.
  • The EAP version only works for about 2 weeks. Please install a new EAP version when the old one expires or install the released version available in Google Play.
Changes
1.36.0-dev (2018-10-16)
  • new trigger Fingerprint Gesture (Android 8+)
  • new trigger Hardware Key Event (Android 4.3+)
  • new action Set LineageOS System Setting to modify system-, secure- and global-settings on LineageOS based ROMs (LineageOS 15.1+)
  • extended action Control UI with functions to operate on elements by ID when multiple elements with the same ID are available
  • extended action Start Activity with option to define the launch bounds to launch an activity in freeform mode (on devices supporting freeform mode)
  • added option in trigger HTTP Request to listen for requests on the WiFi interface only
  • added reply to and mime type field to action Mail with Gmail
  • added script functions takeScreenshot and lockScreen to action Control UI
  • internal changes to Twitter actions since some APIs are replaced by newer ones by Twitter
  • enable widget overlays to extend into area around display cutout (aka notch) when possible (Android 9+)
  • updated Google Play services
  • use new official API for action End Call on Android 9+
  • changes to improve compatibility with Android 9 (especially should fix triggers WiFi Connected/Disconnected)
  • extended action HTTP Request to optionally use a defined network interface
  • added possibility to specify wildcards in trigger System Setting Changed to allow detection of all changes
  • added setting to specify the amount of time to wait for accessibility events
  • optional light theme (Android 6+)
  • minor changes & bug fixes
* This function is not officially supported by Android and might not work on all devices.
** This function requires root access, is not officially supported by Android and might not work on all devices.

:!: Ensure to create a backup before you install an EAP version.

Download: Automagic.apk (2018-10-16)

Regards,
Martin

ewill
Posts: 67
Joined: 20 Jul 2015 16:42

Re: EAP version 1.36.0-dev

Post by ewill » 31 May 2018 14:39

I am not sure that this is related to the EAP, or if it happened prior to that, it is just a mystery that I noticed after installing the EAP.

After EAP installation, I noticed that all of the "Extras" in my "Send Broadcast" actions were missing (all blanks) - every one of them! I have over 25 flows that use them. I confirmed that they were gone by exporting and looking at the xml.

In order to get them back, I wound up uninstalling and reinstalling Automagic from my titanium backup. I then discovered that the "Extras" were still missing. For that reason, I am unsure that the issue is related to the EAP, though I would think I would have noticed if it were missing prior to installation of the EAP .(I have lots flows that use that. I send data to KWGT, and use the "Extras" extensively). I can't figure out what may have made all of my "Extras" disappear.

In order to fix the issue, I had to delete all my flows, then import from a backup - since the import will not do an overwrite. I would think that it would be useful to have an option for an import to do an overwrite (unless it is already there and I am missing something).

Anyway, now I am back to the release version and wanted to do a brief check to see if anybody else may have had the same experience before going back to the EAP.

Hopefully this is a clear description of what I encountered.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: EAP version 1.36.0-dev

Post by Desmanto » 31 May 2018 15:14

ewill wrote:I am not sure that this is related to the EAP, or if it happened prior to that, it is just a mystery that I noticed after installing the EAP.

After EAP installation, I noticed that all of the "Extras" in my "Send Broadcast" actions were missing (all blanks) - every one of them! I have over 25 flows that use them. I confirmed that they were gone by exporting and looking at the xml.

In order to get them back, I wound up uninstalling and reinstalling Automagic from my titanium backup. I then discovered that the "Extras" were still missing. For that reason, I am unsure that the issue is related to the EAP, though I would think I would have noticed if it were missing prior to installation of the EAP .(I have lots flows that use that. I send data to KWGT, and use the "Extras" extensively). I can't figure out what may have made all of my "Extras" disappear.

In order to fix the issue, I had to delete all my flows, then import from a backup - since the import will not do an overwrite. I would think that it would be useful to have an option for an import to do an overwrite (unless it is already there and I am missing something).

Anyway, now I am back to the release version and wanted to do a brief check to see if anybody else may have had the same experience before going back to the EAP.

Hopefully
Confirmed the bug! Beware, don't test this at your main phone. Step to reproduce the bug :
1. Install Automagic 1.36.0 EAP at other phone
2. Start the service and grant the needed basic permission.
3. Create a flow and add any kind of these action : Start Activity, Start Service, Send Broadcast (the actions which has extra field). Add something in the extras, example : x = 1;
4. Save the element and exit the flow.
5. Tap the hamburger menu at top left and Stop Automagic.
6. Start Automagic service again and go back to the flow that has those actions.
7. everything inside the extras field are gone !!!

However General Broadcast Triggers which supposed to use similar extras (Access Intent Extras) doesn't get affected. The script is still there. Seems the triggers doesn't share the same code as the actions.

I am still testing the Control UI part, but so far it is working great. We can select the list element id now. Need more testing to confirm the findings.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

ewill
Posts: 67
Joined: 20 Jul 2015 16:42

Re: EAP version 1.36.0-dev

Post by ewill » 31 May 2018 15:23

Thanks for the confirmation! Based upon this, I am not going to go to the EAP until this is resolved.

Question (or request) - for a way to import flows and have them overwrite the existing flows.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: EAP version 1.36.0-dev

Post by Desmanto » 31 May 2018 15:46

Yeah, just wait first. Martin is on holiday, this won't get fixed for a while. So if you want to try it, make sure to test in secondary phone as I do.

There is no way to overwrite/replace existing flows and widgets yet, upon import. We have to delete the exisiting ones and reimport again. I think i saw it somewhere (or maybe I typed it myself :?: ). But I remember I only request a dedicated backup/restore option only, along saving the flow state upon backup and restoring.

The import feature should prompt us whether to overwrite or not, when it detects same name of flow or widget. It is much more intuitive than having to delete the same name flow first and reimport again.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.36.0-dev

Post by Martin » 03 Jun 2018 14:37

Sorry about that bug. The new EAP build is available now.

You could use action Import Flows/Widgets to replace existing flows. Importing will set the state to disabled for the imported flows. You can also backup the entire Automagic directory and use system settings->Apps->Automagic-Clear data before restoring and restarting Automagic. This should also preserve the state of the flows.

Changes in this update:
  • fixed reading saved extras in actions Start Activity, Send Broadcast, Start Service
  • added ringtone example to Start Activity
Download: Automagic.apk (2018-06-03)

Regards,
Martin

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: EAP version 1.36.0-dev

Post by Desmanto » 04 Jun 2018 18:06

Haven't tried it yet, need to finish some flows due tomorrow.

For Import/export, sorry. What I mean is the import directly from flow.xml. If we import it by opening it and handled by Automagic FlowImportActivity, then it will always ignore the duplicate. It seems you purposely make it this way so we don't accidentally replaced some flow.

But thanks, I really forget that action. I can just simply create the Intent Received trigger to import it. When need to replace the flow, I may not tap to open it. But I have to to share it to Automagic, and automatically parsed the flow.xml location, import it and replace exisiting one. (and enabled it back if needed). Just one or two extra tap on share button, if we need to replace.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.36.0-dev

Post by Martin » 07 Jun 2018 20:36

A new EAP version is available.

Changes in this update:
  • new trigger Hardware Key Event (Android 4.3+)
  • new action Set LineageOS System Setting to modify system-, secure- and global-settings on LineageOS based ROMs (LineageOS 15.1+)
  • made built-in shortcut icons adaptive (Android 8+)
  • use official API for action End Call on Android 9+
Download: Automagic.apk (2018-06-07)

Regards,
Martin

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: EAP version 1.36.0-dev

Post by Desmanto » 08 Jun 2018 15:49

- Start activity etc bug is fixed, the extras stays even after stop/start Automagic.

- clickByIdAndIndex() works great. Now, the full scripting for all types of UI element is complete. For the 1st element in the list, it only show clickById(), no clickByIdAndIndex(). I think this should be shown as clickByIdAndIndex() too, with index 0. If I put it manually now, it works. But I prefer just to make it distinguished from other type of element, and for better looping (we can loop using the same function, changing only the index). This is just minor cosmetic issue, but will be more consistent throughout the list element.

- Trigger HTTP request limit to wifi interface now works fine, VoLTE interface cannnot be accessed anymore, better security.

- Hardware key event is another great addition in this EAP. Wow, it seems no reason to install auto input anymore. This only require accessibility and support most variation of keys (only power is ignored). But this cause a bit laggy UI in my old phone, so should only enable the trigger when needed. But using this trigger, we can remap the hardware key for specific purpose, or event block out the whole home/back key, preventing exiting from certain menu. I am seeing shortcut for bluetooth keyboard or custom gamepad function too.

BTW, as this trigger is so powerful, I would suggest an extra red warning on the trigger. If someone just block out the back/home/recent key, enable the flow with a high AES (1000), he/she could be blocked out from using the hardware key. Pressing the button will trigger the flow again and again. I just got the problem the moment I tried it :D I use debug dialog and BACK key as the trigger. The debug dialog pop up and I furiously press back, until I realized that the back key is the trigger too :D Thus looping until hitting Emergency stop.

There is an escape way though. It seems to intercept only the hardware level event. But using Control UI back(), home() or other (software level event), will be ignored by this trigger. So I can still use widget floating to tap back() even when I blocked out myself from the back key, until I disable the flow. Other app shortcut that trigger back at software level also will be ignored. Adb shell input keyevent also ignored. So might be a good idea to develop the flow which need this trigger when using it with scrcpy mirroring.

- Set LOS system setting makes me wanna try LOS in the near future. It seems this is the ROM that has great support for automation.

- Fingerprint trigger doesn't work at MIUI 9 Oreo 8.1. I still haven't found the use yet, so I digress. If someone has the useful example usage, please share.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: EAP version 1.36.0-dev

Post by Martin » 08 Jun 2018 19:19

Thanks for testing! Glad the bug is fixed now.

clickById() should work the same for the first element when no index is specified since it will invoke the action on the first found element. I prefer to hide the clickByIdAndIndex for the first element since it keeps the list of possibilities shorter.

Good idea to show a red label in trigger Hardware Key Event. I hope no one will completely "lock" the device this way, otherwise booting to safe mode might be the only solution. Actually the emergency stop counter might also help when it's not set to a very high level in the settings.

I'm not sure how many devices support the fingerprint gestures but it could be useful for things like simulating backward and forward in a browser by swiping left and right on the fingerprint sensor or to increase/decrease brightness when auto-brightness does not work well.

Regards,
Martin

Locked