App Inventor sharing files No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 (has clip) (has extras) } - app-inventor

I'm a beginner at App Inventor and I don't know what I'm doing wrong with the sharing component. I'm trying to share a sound file but it gives me the following error:
No Activity found to handle Intent { act=android.intent.action.SEND flg=0x1 (has clip) (has extras) }
The code is the following:
I also tried the following things:
This doesn't work.
This reproduces the sound perfectly. That means that the picker works and the file exists.
I put a file in my root folder and it works but I want to send the file which was picked from the list which is in the following folder "/storage/sdcard0/MyDocuments/Downloads/app_inventor_1431867799168.mpeg".
I don't know where is the problem and I look in a lot of forums and none of the solutions solved my problem.
Thanks for your help.
PD: I just found that the downloaded files are stored in .MPEG format which it is a compressed format. It is possible that sharing function don't find any app that accept this type of format. If this is the problem please tell me what I have to do to make App Inventor to not change the original .mp3 file.

ok, problem solved as I said in the PD part the problem was that by default App Inventor stores the audio files in to MPEG format. This format is not recognized by whatsapp, gmail, etc...
Solution was to set a name to each file when I download them that ends with .mp3
With this extention the programs of my device recognize them and now I can share my audio files.
Thanks to everyone that was trying to solve this problem.

Related

I cant load HTML file into WebView from app specific storage since Android 11 (SDK30)

My App has the following use case:
We download a geojson file, a html file and some audio files from a server for a specific language a user has chosen and we are saving this in the app specific file directory.
The directory path is the following for each use case:
For the HTML file we have:
/storage/emulated/0/Android/data/my.example.com/files/ExampleApp/EnginePayload/de/html-file.html
For the json file we have:
/storage/emulated/0/Android/data/my.example.com/files/ExampleApp/LocationPayload/de/geojson-file.geojson
Audiodata:
/storage/emulated/0/Android/data/my.example.com/files/ExampleApp/Audio/de/intro.mp3
/storage/emulated/0/Android/data/my.example.com/files/ExampleApp/Audio/de/outro.mp3
and so on...
Since i have to change the minSDK and compileSDK to 30 i don't get the files to work.
I load the html-file.getAbsolutePath() to the webView but the webview client does not call ANY callback!
The audio files will not be started, because we use javascript functions to do that.
As i unterstand it, the app specific directory does not have to be changed because even on Android 11, the app has permission to read and write its own created files.
The moment i change it back to SDK 29, everything is working.
I don't know what to do. Can someone help me please?
I fixed it myself after hours!
My assumptions were right. The app had access to the files, because the app created them itself. so there was not an issue here to read the files...
Here is my fix and i hope it will help someone in the future:
There was something missing in the settings for the WebView.
webView.getSettings().setAllowFileAccess(true);
This allows me now to load a html file (with absolute Path) from the app specific directory for Android 11.
Here is my code:
webView.getSettings().setAllowFileAccess(true);
File extDir = cxt.getExternalFilesDir(null);
//htmlPath is something like this: "ExampleApp/EnginePayload/de/html-file.html"
File twine = new File(extDir.toString() + "/" + htmlPath);
webView.loadUrl(twine.getAbsolutePath());

Cannot delete particular file

I am developing gallery viewer app. App will fetch the image file from Isolated Storage and will show in an image control. Most of the things are already setup and working fine.
Now images are stored in folders which act as album and user can delete the whole album. I tested with many many folders with assorted images and delete works fine. But I see that when there is a particular image file of name "XXXX.jpg", it doesn't get deleted. Although all the images from folder are shown in image control. That file doesn't gets deleted, and an exception is thrown "ArgumentUnhandledException". I tried after renaming the file but earth didn't move.
Also, for testing purposes I am transferring folders(with images in it) using "Windows Phone Device Manager". I know it is not official to use it, but it makes testing easy. Also peculiar thing is that "Windows Phone Device Manager" also cannot delete that particular file, although I dumped that file in app's isolated storage using "Windows Phone Device Manager". So I think that there is some problem with that file.
How can I delete the file. And if I cannot, how can I know it before hand that some files cannot be dealt with properly and should not be dumped in Isolated storage.Here is that file. File is inside zip file. I think file is required and not not just uploading image to a image hosting site. Please take a look. Also try not to look over the content of image file, that's only random file which is not working and I want to know why.
I found that file was marked read-only and was causing problem when a delete attempt was made. Removing read-only solves the problem.

PowerPoint doesn't run Videos on other computers even after using Package for CD

I wanted to show a Presentation. When I run it on another computer, both the sounds and the vids didn't work. I found out about Package for CD and run it. The audio started to work on other computers, but the videos still ain't working. I am also including the audios and vids as the included files, but still, only the audios are working and the vids just show as thumbnails.
I am using PowerPoint 2007, Please help me if you have got any idea.
Thank You
It would work to save the original video file (not one copy pasted from the powerpoint presentation) in the pc. I assume you are the recipient of an emailed presentation. Make sure to have the videos in the ppt emailed as well.
For vids to play in PPT, two things have to happen:
PPT has to be able to FIND the linked video file, and
The CODEC required by the video must be installed in Windows
To keep links from breaking, you have to:
Save the PPT at least once before adding any videos
Put the video files in the same folder as the saved PPT
Make sure that the videos and the PPT file stay together, in same folder, on any computer where you want to play the presentation.
Package for CD should have handled all of that correctly for you, or modified the presentation so that it works as though it did.
As for CODEC though, you might try inserting the video into a new presentation on the system where the vids aren't working. If they still don't play, you need to figure out what codec was used and install it (or re-make the videos with a more common codec).
I'm not enough of a vid wiz to explain exactly how to do that; perhaps someone more knowledgeable will come along to fill in the blanks. If not, google is our friend.

Implementing a comment function

i want to implement the possibility that people can comment on a picture, that is
displayed to them in the app. And that all other users can see the comments.
I was thinking about using a xml file in which the comments are put. And everytime
the app starts, this xml file is opened and the comments are displayed.
Would something like this work? Or is there a better possibility?
The other thing is, where to save this xml file? Could it be uploaded to skydrive / dropbox
from the app automatically?
You can save your xml in SkyDrive. Have a look at the Live SDK:
http://msdn.microsoft.com/en-us/live/ff621310
(Keep in mind if you share the file with a read & write hyperlink everyone who is able to view this link can read & edit your xml file.
Maybe you can create a Live-ID only for your App to get access to SkyDrive folders & files.)

How to use the existing Png-Shell-Thumbnail for my file types?

I am currently writing an application working with specially prepared image data. Another tool prepares the images (basically PNGs with additional data stored in the meta-data section). Now my tool works with these files, but not with all PNGs, so "we" decided to use a different file extension. So far, so good.
Now, because I am a lazy sack I implemented some file type registration to allow double-clicking on the file and opening it in my application (no problem at all).
And here is my Question:
It would be cool if the windows explorer could still show me the thumbnail previews for my files. Since they basically are still PNG files, it should be possible without writing my own shell extension (at least I believe so).
I quickly tried to copy all registry keys and values from HKCR.png to HKCR.mInDat (my file name ext) and it worked. However, I would prefere knowning what I am doing ;-)
Which of the registry settings are responsible for the thumbnail preview control and which can I use to get the preview for my file types?
I tried to google it, but I failed, since it seems I am unable to come up with the right buzz-words to find the info I need. Please, help me.
Thank you!
Yours,
3of4
Simple:
[HKEY_CLASSES_ROOT\.apng]
#="apng"
"Content Type"="image/png"
"PerceivedType"="image"
[HKEY_CLASSES_ROOT\apng\shellex\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
#="{3F30C968-480A-4C6C-862D-EFC0897BB84B}"

Resources