Action block to check compatibility versions

Dm114

Well-known member
To check whether current MD version is compatible with minimum requirements of the calling macro.

Just add the 2 Action lines** at the top of your shared macros to be sure users will always be able to run your macros safely, without bugs due to not implemented functionalities on their devices.

INPUT variable:
β€’ MINver : optional* string variable containing the minimum version # to be reached (with major.minor # only, such as 5.25 instead of 5.25.3)

OUTPUT variable:
β€’ OUTver : string variable returning:
- the minimum version # if current MD version is same or higher
- empty if current MD version # is lower than the required one

*: "MINver" is optional and can be replaced by the constant value of the minimum version # in the Action block calling parameters as this version # is not supposed to change for this calling macro. When modifying this macro and adding new features, it's easy to change the value of this constant if necessary.

**: The 2 Action lines to add at the top of the calling macro are:
- Action block call with its 2 IN/OUT parameters
- Cancel macro action with Constraint depending on the returned value of "OUTver"

Enjoy!

 
Last edited:

Dm114

Well-known member
Nice work πŸ‘
For the lazy one's, how about a link to MD in the pop-up πŸ˜‰
Thanks for your support!

What link are you speaking about? A link to upgrade MD?

If so, I've made a short macro to update it automatically
 

Dm114

Well-known member
Yeah, as mentioned for the lazy πŸ˜…
More seriously I made that for people (nubies mainly) who would use some templates in the MD template store and who wouldn't be aware enough about MD updates.

So, if people like you write macros with some new features, I could be interesting to add these 2 lines in every macro.

Of course it's a totally free suggestion... πŸ˜‰πŸ™‚
 

Snurre

Well-known member
But I think you might misunderstood what I mean, there's a dialog when MD is not updated
On this dialog you could (if you want πŸ˜‰) add a line or two with "Get it here" and then the link to apkmirror, playstore or whatever
Screenshot_20220627-100812_MacroDroid.jpg
 

Dm114

Well-known member
But I think you might misunderstood what I mean, there's a dialog when MD is not updated
On this dialog you could (if you want πŸ˜‰) add a line or two with "Get it here" and then the link to apkmirror, playstore or whatever
View attachment 2945
Yeah, I understood but I wanted to make something light and robust enough.

Moreover it is mainly to prevent macros from erratic behavior rather than taking (new) users by the hand to update MD: if they were able to download MD, I suppose they are able to update it! πŸ˜‰

It also could prevent them from having a bad opinion of MD, thinking it doesn't work correctly or is not reliable...

If you think your suggestion can be useful, feel free to add it: all macros and Block action I share can be improved by users of course.

Have a nice day!
 

Snurre

Well-known member
I fully understand you and you are absolutely right, it was NOT to criticise anything
I think you are doing a really great job πŸ‘πŸ»
And a nice day to you too (don't know how nice mine gets, it's 29Β° C in the shade right now πŸ₯΅)
 

Dm114

Well-known member
I fully understand you and you are absolutely right, it was NOT to criticise anything
I think you are doing a really great job πŸ‘πŸ»
And a nice day to you too (don't know how nice mine gets, it's 29Β° C in the shade right now πŸ₯΅)
Thanks again for your support. πŸ™

Don't worry, I absolutely did not take your comments for a criticism. πŸ™‚

According to the weather, today it's both sunny, rainy and windy : I'm living in Guadeloupe-FWI (in the Caribbean, UTC-4). So most of time temperature is between 28 to 32⁰C, but we're now entering the hurricane season... ☹️
 

Dm114

Well-known member
Yeah ok, but I'm just an old, fat biker from Denmark and we're not used to that πŸ˜…
Vikings don't stand the heat so well
Take care 😊
I died laughing at your description! πŸ˜…

Take care too, from an old, not too fat, former biker (long times ago). πŸ™‚
 
Top