EAP version 1.34.0-dev

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

Moderator: Martin

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

Re: EAP version 1.34.0-dev

Post by Desmanto » 27 Aug 2017 05:21

Thanks for integrating the new findAll() function. The additional "true" argument makes it can capture group just like matches().

I tested it out to the same html, but the capture only contain single element. The captured group is there (only one), but seems to be mixed with the first element.
capture supposed to have capture[0] as the whole match and capture[1] as the captured group.
But it now only has capture[0], with the content capture[0] concat with capture[1]. Seem the list separation is not working.

I tried again with the example from the same thread http://automagic4android.com/forum/view ... 878#p18595

Code: Select all

a = "1a2b3c";
x = "5x7y8z";

capturea = findAll(a,"(\\d).(\\d).(\\d).",true); //capture 3
capturex = findAll(x,"(?:\\d).(\\d).(\\d).",true); //capture only 2
lena = length(capturea);
lenx = length(capturex);

i = "1a2b3c\n5x7y8z";
capturei = findAll(i,"(?:\\d).(\\d).(\\d).",true); //capture only 2
leni = length(capturei);
The result is
capturea = [[1a2b3c, 1, 2, 3]]
caputerx = [[5x7y8z, 7, 8]]
lena = 1
lenx = 1

capturei = [[1a2b3c, 2, 3], [5x7y8z, 7, 8]]
leni = 2

It seems the list separation messed up. I think that capturea should have 4 elements, capturea[0] is whole group, capturea[1] = 1, capturea[2] = 2, capturea[3] = 3.
But instead it only has single element, combine all the elements text. lena is 1 confirm that.

capturex also the same, the non-capturing group works perfectly. It is only the list messed up.

for capturei, the idea of multiline seems to be OK, it has 2 elements (leni = 2). So we have list inside of list (listception :D ). I expect that capturei[0][1] to access the first capturing group from first line.

=====================
Additional bug that I forgot last time. When I search from main menu (magnifying glass), the text that I type in the search, doesn't show up, but it is filtering.
So maybe the color of the text is the same with the background.
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.34.0-dev

Post by Martin » 28 Aug 2017 19:01

Thanks for testing!

The new function findAll with true always returns a list containing the list of groups for each match, respectively one element for the entire match plus the defined capturing groups.
lena is 1 because there was only one match. The first element in the resulting list is a list with the entire match plus the 3 groups so length(capturea[0]) should be 4.
lenx is also 1 since the pattern was also contained only once. length(capturex[0]) should be 3 (entire match + 2 groups).

capturei has a length of 2 since the pattern was found twice. The first element capturei[0] is the list [1a2b3c, 2, 3], the second element capturei[1] is the list [5x7y8z, 7, 8].


About the search feature: What device/manufacturer/Android version are you using? Custom ROM or using a theme of some sort?
Is the text in the search field always invisible or only after certain steps?

Regards,
Martin

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

Re: EAP version 1.34.0-dev

Post by Desmanto » 29 Aug 2017 14:52

Oh, so result is always list inside list (double [[]] denotes it). Means to access the first capture of capturea, i need to use capture[0][1]. I got it already, I think it is better this way, so we can access all elements separately. Should have put the extra note in the documentation. Thanks for adding this feature. :)

=============

Sorry about the bug, my bad, forgot you don't have crystal ball. :D That is my secondary phone, used mostly for testing, including this EAP version. It is Hisense Pureshot HS-L671, Android LP 5.1, Qualcomm SD415, 2/16 GB, Stock ROM with the overlay VisionUI 2.0, somewhat a combination of AOSP with slight MIUI touch. The text color is not visible everytime I tap the search icon. It happens everytime, consistently. Start automagic, tap search icon, type something, nothing visible, but the filter works.

I screenshot the view and check the color. The text is showing as black color (#000000) and background is Grey 10% (#111111). Since the color is very close, the text seems to be invisible at quick glance (it is black with grey 10% background). I need to zoom in the spot the text. (BTW, just realize automagic format character pattern don't have "show as hex")
Search - Black Text on Grey Background.png
Search - Black Text on Grey Background.png (28.31 KiB) Viewed 53152 times
My main phone is Hisense Pureshot Plus 2 HS-L697, Android LP 5.1, Qualcomm SD617, 3/32 GB, Stock ROM with overlay VisionUI 3.0. It doesn't differ much, since it is from the same vendor. I tried to install the EAP version, the search button works fine at my main phone. The text is showing white color (#FFFFFF) and background is Grey 10% (#111111). Very contrast color, very visible.

Don't know why my secondary phone shows up as black text. I don't run on any night mode or changing the theme. The phone is pure stock ROM without any modification. I have tried to uninstall-restart-reinstall, still shows black text. No log can be sent since not related to flow, only UI. The problem is only the color that makes it very difficult to see. Everything else for the search function works fine.

===============

Additional minor bug, when reinstalling, i export all the flow to make a backup. At send flows/widgets, When tap the check all box, everything is checked, but the OK button still grey out, can't be tapped. I must uncheck 1 other checkbox first (and check it again), then the OK button can be tapped. Or I can tap any random flow to check it and tap check all, then OK button can be tapped. So the minor bug is single tap directly at check all box won't enable the OK Button. It happens in 1.33.0 and 1.34.0 EAP.
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.34.0-dev

Post by Martin » 29 Aug 2017 20:19

I think this black text problem is an issue of the ROM since this text field is a stock Android component without any modifications on my end so I don't think there's a good way to fix it in Automagic without risking to break it on some other
ROMs. It seems that your main phone uses a newer version of VisionUI. Maybe the manufacturer fixed this bug in version 3.0.

The bug with the disabled OK button when selecting all flows/widgets should be fixed in the next build. Thanks for reporting!

Regards,
Martin

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

Re: EAP version 1.34.0-dev

Post by Martin » 29 Aug 2017 20:30

Couldn't resist and added a workaround attempt for the black text in the next build. I hope it does not bite back in the future ;-)
Let me know if it works on your secondary device.

Regards,
Martin

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

Re: EAP version 1.34.0-dev

Post by Desmanto » 30 Aug 2017 11:53

Yes, I also confused why it is like that, since both using a very similiar ROM. In fact, that VisionUI 2.0 is almost the same as VisionUI 3.0, only slight upgrade.

BTW, at 1.33.0, the search text is still white in Pureshot HS-L671. Since 1.34.0 revamp the whole layout, maybe something changed and become incompatible with it.
Thanks for working on the workaround, will wait for next build. :)
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.34.0-dev

Post by Martin » 02 Sep 2017 19:40

A new EAP version is available. Version 1.34 is considered feature complete so I will (mostly) only test and fix bugs in the next few days/weeks.

Changes in this update:
  • new action Snooze Notification on Statusbar (Android 8+)
  • workaround attempt for ROMs that show the search text on the flow list with black text on dark background
  • minor changes and fixes
Download: Automagic.apk (2017-09-02)

Regards,
Martin

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

Re: EAP version 1.34.0-dev

Post by Desmanto » 03 Sep 2017 01:29

Hi Martin,

Thanks for a quick fix. Now the Pureshot has shown White color text on gray blackground at the search text box :) Check it already, text color is #FFFFFF. It seems to be the ROM's fault though, because there are some other system element UI also mess up the color since I upgraded to LP 5.1. Never know that, since this is secondary phone.

For the send flow bug, where single tap at check all box also has been fixed. Now single tap on checkbox all will enable the OK button.

Regards,
Desmanto
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.34.0-dev

Post by Martin » 04 Sep 2017 19:22

Glad it's working now. Thanks for testing!

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

Re: EAP version 1.34.0-dev

Post by Martin » 10 Sep 2017 08:51

Hi,

Version 1.34 has been released and should now be available in Google Play (for devices running Android 4+).
Many thanks to everyone for helping to test this version!

Regards,
Martin

Locked