Please do not hijack threads! You already started a thread about this here:
FOR TRANSPARENT BACKGROUND
try to use this color as number: 4294967295
note: use this as number (the blue box) not as text (the red one)
4294967295 is white.
Extension cannot work .
Did it work with any one
It may not work on Android 10+ as it needs to read and write files on the SdCard.
I like this extension very much and it is doing a good job on an Android 8.0.
But under Android 10 it does not collaborate with me:
I got the following error in companion:
/mnt/sdcard/AppInventor/assets/Triwizardcup.gif: open failed: ENOENT (No such file or directory
I dont have a sdcard in this mobile.
Here is the relevant block:
Even if I add an explicit path to internal memory space (like /storage/emulated/0/Pictures/), where a copy of the desired file resides, the extension will not load the gif.
Any Ideas how I can display the gifs even on the Android 10 Mobile? Is it a matter of permissions and how can I set these?
A helpfull information would be appreciated!
In this web page I have put the version com.KIO4_AniGif10.aix, destined for Android> = 10, Can you test if it works for you?
Files are saved in ...
/storage/emulated/0/Android/data/edu.mit.appinventor.aicompanion3/files/ ... in emulation with Companion.
/storage/emulated/0/Android/data/'namepackage'>/files/... when Built.
This was really a fast reply! Thanks for your help. I will tryout this... and come back here!
Very good Juan_Antonio!
It works now with my android 10 mobile.
With old one (Android 8) it does not anymore out of the box. I have to change the path to the gif images to
Seems that my AppInventor 2 resides in the first plane of internal memory, not in the Android directory.
I will test how it works if the APP is compiled...
Thanks again for your help!
that path to the assets will work only in the companion app
Sure! The build-version is different. I will check that later...
So, it seems that I got it (nearly..).
To take the right path for the gif assets is a challenge. Especially because they are not the same in companion und build version. I copied my assets in different places and not all of them are obviously readable from my app, even though the files are there (and readable from within the file explorer). Dont know why this...
One question stays:
The path for the build (apk-) Version under Android 10 is:
If I install my App under Android 8, this path does not exist. Where resides the App under Android 8? Can somebody give me a sign, even if this thread is not directly related to that issue.
One suggestion for an improvement in newer versions of the gif extension:
Try to catch the division by zero error, if the wrong path is provided. The timer event with the next-frame method fires otherwise very fast errors and the original wrong path from the Loadgif method can not be seen.
Again Thanks for your help. I really appreciated it.
This post seems really helpful, as I am having trouble displaying a transparent gif in mit app inventor. The method I was using before (file:///android_asset/nameoffile.gif) is working (aka the gif is playing), but the gif's background is showing up as white, not transparent. However, I am having trouble understanding your code. Where is the block "KIO3_AniGif1. Load Gif" coming from? I do not see it anywhere in my blocks window, even under the image component blocks.
That block is in the extension.
Some animated gifs don't work with transparent background with this extension. Try to set the background color of the screen.
What version of Android are you using?
Can you upload your gif file to this topic? (in this topic your gif will not be animated)
Is there a way to download the extension?
Also, I am using an ipad with ios14 to test my app, and it is on the ipad where the gif background becomes white. The webviewer in which I am displaying the gif is on a screen with an image backdrop. I can tell that the gif background is white because when I run the app it plays but covers part of the backdrop of the screen. My gif file is a sticker from GIPHY with a transparent background (dog jumping)
if you are using the ios companion then extensions will not work.
Looks like you are not assigning an image component to the extension.
You could really help by showing your relevant blocks