Why does the original permission in my app suddenly turn into a variable block when the original permission is asked, and this variable appears from nowhere
1 Like
dora_paz
(Dora)
April 27, 2022, 2:08pm
#2
Because with latest release 1.5.4 added in blocks editor dropdown blocks
See Kodular Fenix 🔥🐦 - #6
1 Like
But it’s still a string, unlike with AI2:
AI2 :
2 Likes
Taifun
April 28, 2022, 11:26pm
#4
@pavi2410 is this a bug or a feature?
Taifun
pipechela
(Felipe Valenzuela)
April 29, 2022, 2:27pm
#5
I think it’s a Big, because I have a permission problem
I tried with 3 ways
And when i Open compiled app it closes and gives me this error
(Obviolsly i tried 1 opción at time, inside onScreenIniti block)
pavi2410
(Pavitra Golchha)
April 29, 2022, 3:51pm
#7
More likely an i18n issue, but I’m investigating it.
pavi2410
(Pavitra Golchha)
April 29, 2022, 3:52pm
#8
Which components have you used in your project that requires GPS? That would help a lot
pavi2410
(Pavitra Golchha)
April 29, 2022, 4:08pm
#9
mit-cml:ucr
← ewpatton:hotfix/legacy-files2
opened 06:41PM - 26 Aug 20 UTC
This change makes use of the new helper blocks to provide robust access to diffe… rent parts of the Android file system under the latest constraints imposed by Google. Due to the complexity of this change, it is broken into some smaller commits to make it easier to review. Each change in brief:
1. Revert closure-library change (also part of #2511)- Not strictly needed in this change and should be rebased out once the other PR is merged
2. Fix helper blocks not working in emulator- For backwards compatibility, the helper blocks send a macro to the companion that is used to protect against accessing the undefined classes on older companion versions. However, this macro was only sent in the Wifi codepath and not the emulator/USB code path, which prevented the logic from working in the emulator
3. Fix helper codegen for non-hygenic macros- The helper blocks use Kawa's colon notation to reference the static enum fields. However, Kawa's reader seems to process this differently from within a non-hygenic macro (e.g., foreach). Therefore, helper blocks work fine outside of certain block constructs but cause read errors within others. This change switches to using the more verbose `(static-field class field)` lookup, which behaves consistently when used within a macro.
4. Refactor project settings to use a builder pattern- This makes it more convenient to add/manage project settings. It also allows for the fact that settings could be semantically the same even if the serialized content ends up in a different line order.
5. Refactor Synchronizer out of MediaUtil- This is a stepping stone for the following change...
6. Implement limited continuations for the blocks language- This change adds support for allowing components to take a continuation parameter for continuation passing style. Because we do not implement CPS in the code generator, component functions at this time MUST block the UI thread and invoke the continuation on the UI thread once complete. This restriction can be relaxed once full CPS is implemented. This is used by the new method blocks in the File component introduced in...
7. Implement scoped storage in accordance with SDK 30 requirements- Adds a new FileScope helper block for specifying what scope a file should be put in. The default is App specific storage (available on Froyo and up). THIS IS A BREAKING CHANGE. Existing apps that need access to files outside of the app-specific storage should switch to using the Legacy scope, which provides the old behavior. Existing curriculum and tutorials should not be affected by this change if followed from beginning to end within a fresh project.
8. Update to SDK 30- Updates the android.jar and various other flags/constants so that compiled apps target SDK 30.
TODOs:
- [ ] More testing of the shared storage scope
- [ ] Add documentation for the File component to discuss the different scopes and how they work
- [ ] Create some example apps showing off the new File functionality
- [ ] iOS support for the new properties and methods
We inherited this bug from MIT AI. The fix for which is already on the upcoming major update.
1 Like
Correction . The isString?
method seems to return an incorrect result, because it is not possible to connect the permission block to trim
:
So until this bug is fixed, ask for permissions like this (before):
2 Likes
pavi2410
(Pavitra Golchha)
April 30, 2022, 9:04am
#12
It’s going to be fixed with the major update. We’re very sorry for that!
1 Like
Fine, and please take a look at the bugs with the File
component, which I mentioned many times.
1 Like
pavi2410
(Pavitra Golchha)
April 30, 2022, 9:07am
#14
Same, it’s going to be fixed with the major update. It uses the enum blocks to bring the concept of various File Scopes as seen on AI.
Do you have test AIAs handy?
Hopefully not with the same bugs as AI2.
… and please do not introduce the DefaultFileScope
like AI2 did.
pavi2410
(Pavitra Golchha)
April 30, 2022, 11:04am
#19
This is actually on the roadmap. Why is it bad?
pavi2410:
Why is it bad?
Here is just a small selection of links / my posts I’ve made on the AI2 forums.
(I have pointed out these bugs / issues countless times) :
https://community.appinventor.mit.edu/t/default-filescope-is-this-the-same-in-screen-and-file/44639/12?u=anke
Yes, but There are some methods that the File component does not offer. The use of your extension is familiar to most users, which is definitely not the case with the new File component. On top of that there is one more setting in the...
If → DefaultFileScope is not set to → Legacy in the Designer this also happens on Android versions between 4.4 and 9 (Android ≥ 4.4 [KitKat, API 19] and ≤ 9 [Pie, API 28]), because the maxSdkVersion for READ / WRITE is 18. See also here: ...
UPDATE (Feb 28, 2022): To get rid of the annoying problem / bug "Error 908: The permission WRITE_EXTERNAL_STORAGE has been denied. Please ..." you MUST set DefaultFileScope = Legacy (Designer). Here is versions of an extension, with which both...
Reading time: 1 mins 🕑
Likes: 11 ❤
Here is a modified version of Sunny's EFile extension, which added some methods that are needed (among others things) for testing purposes with Companion & AKP. Because if you try to save in one of the Shared folders (/Documents or /Download)...
Reading time: 6 mins 🕑
Likes: 25 ❤
https://community.appinventor.mit.edu/t/default-filescope-is-this-the-same-in-screen-and-file/44639/5?u=anke
1 Like
… and last but not least this one: