File1 delete problem


why not deleting file from android/data/appinventor_myproject/file/my documents/recording/delete 3gp file??????/

Can you show me all the other blocks related to File1 component?

i have just used delete block.here i show all my block

The File component uses (needs) a relative path.
(Try to use one of the File extensions from @Taifun or Sunny.)

please give me extension link i am new in mit app.

Search for TaifunFile or FileTools.

1 Like

The issue is twofold:

  1. If your filescope is set to App, then the File1.Delete block will be using the path to your ASD already:

/storage/emulated/0/Android/data/<yourpackagename>/files

therefore you are adding your "sound" filepath to this. it will not work.

  1. There is a bug in the default soundrecording save file path, it includes a directory with a space in the name: My Documents. Android/AppInventor cannot cope with that.

Set your own file path for sound recordings using the block provided.

These blocks will work:

no need for any extensions to do this.

To what extent can AI2 not handle this, and in particular, why should it be a bug in the SoundRecoder component?

There is only one component that has to handle the absolute path from the SoundRecoder, and that is the Player component. And it can handle it without any problems if the appropriate path is set.


Besides, it's actually easier to make the fullpath suitable for the File component by tediously replacing it multiple times than to simply use the TaifunFile extension, which can handle absolute and full paths. I don't think so.

Horses for courses :slight_smile: but my method will also work for iOS.

No.

OK, instead of just saying "No", why not enlighten me and everyone else with the reason why using the file component Delete block with the blocks I provided will not work on iOS. I only said what I did because no extension is used. I see the Delete method is present for iOS, but makePath is not yet ready so this would need to be done another way...

As a part of the community I feel we may be squabbling in front of a user who needs help, Please try not to go in a different direction.
_Junko

Or at least make a new topic.


delete woring when i put delete block in green box but when i put it in HttpUtil1.GotText it isnot working?
what is the problem?

How many arguments does the HttpUtil1.GotText event have?

Also remember the itoo usage

  • A component does not get created until you touch any of its block.

and use the evaluate but ignore result block togetther with HttpUtil1 before registering that event

Taifun

Also do not use global variables in the background

  • Do not use global variables, or try to access/set them.

Taifun