Anything can be solved with Blockly, given enough computational time. The major issue usually arises in competing against time. You only have around 5 seconds at a stretch to run a computation on the UI thread before hitting an ANR. Therefore it is a valid choice to make a procedure that iterates over a loop n times before saving it’s progress to a global variable, starting a timer, and terminating itself. When the timer fires (all parameters for the timer should be provided by the core procedure), it will again call the procedure, with the values from the global variable as the new parameters. This will be repeated until the desired result is obtained.
The Clock component is crucial here, and is allowed.
Calculation resolution using iteration and timer?
How? Because I’m either stupid or I don’t understand something,.
The challenge was a long time ago. I would like a specific solution.
My two ideas look like this:
Make a database of all world phones. Read the model and select the saved resolution from the table.
Write the script to a webviewer that reads the correct resolution.
Although there is a third way. You can write your own extension …
My Timer example was to show how time consuming tasks can be executed on Blockly. As for the challenge in question, you can use the Screen1 properties to obtain the display dimensions in DP.
That is your real solution. There is no such thing as “native resolution” from the perspective of a single app. It only gets the Display Independent Pixel (DiP or DP), and that is what matters.