Sorry, but I'm new, so I don't know how to create a .txt document using APP INVENTOR, and i want to create a code to convert a unit like lb to another like kg in java but i don't know how i can't upload and create the neccessary file.
I'm so sorry, but my English isn't so good.
Create a extension and import it in mit app inventor.
You can create a text file using the File component.
Converting units is pure math and you don't need java and extensions for that. You can do it with blocks.
1 Like
![image](https://community.appinventor.mit.edu/uploads/default/original/3X/d/0/d02aed094904aa6ec10a3593e12b653bfc038de9.png)
To make this accessible on devices Android >11, remember to set the DefaultFileScope
of the Screen to Legacy.
Do you mean you want to create an extension to convert these units? No extension is needed.
1 pound = 0.454 kg, so x pounds = 0.454x kg.
![image](https://community.appinventor.mit.edu/uploads/default/original/3X/0/c/0c7c678f49b65fc92b23dc96be85721125765f0c.png)