File corrupted when downloading it to the phone

There is no harm in using Globals in App Inventor - in fact, it is easier to debug the code as Globals work with 'Do It'. There are times when you may have a lot of individual pre-set values. For these, use a Block List (roughly the equivalent of C#'s List<T>).

1 Like

Yes but using globals means that they can be modified in several procedures and it's often better to use locals so they can only be modified in one procedure and are no more available in the other ones.

What I would like to find in App Inventor is something like object programming. In my App, where reading the Call Log, I find for each call :

  • Call Number
    -Call Type
    Call Duration ...
    So I would like to be able to create a Call object with Number, Type, Duration etc. as properties, so I could be able to store the information in my own objects, and not to have to use Lists of Lists and other tricks like that ... But I guess it is not so easy to represent this by blocks like those we have in App Inventor.

... that can be a bad thing, but also a good thing - depends on the purpose of the variable and the wisdom of the developer.

1 Like

It doesn't have to be a List of Lists - it can be a List where each item consists of all values for one phone number, separated with a comma or other char that would never be in a value. When an items contents need to be displayed, it can be split into a temporary use List (with the Text Split function) and from there a simple loop can display the values in Labels.

Very nice work detective Dora :sunglasses:

2 Likes

Android 9:

Or download the apk to your computer and copy it to the device:

1 Like

@ByB Let me know if this works for you:
com.sunny.calls.aix (5.9 KB)

2 Likes

Thank you. Is this a specific development ? It works well once the according permission has been granted. But to use it I would need also the date at which the last missed call has been issued. Adding a method like GetLastMissedCallDate would be useful.
Regards.

Thank you. Is this a specific development ? It works well once the according permission has been granted. But to use it I would need also the date at which the last missed call has been issued. Adding a method like GetLastMissedCallDate would be useful.
Regards.

No doubt it would be useful to lots of App developers.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.