Hey, I'm having trouble running an android app built in MIT App Inventor. After installing on the device, the application shows on the device in the menu, but when you try to start it, the screen will only flash and returns to the menu. I know that it is not the fault of the application. Maybe someone had such a problem and dealt with it?
How do you know that? Can you tell something about your app. Did you uninstall a previous version or do you use large assets in your app?
How can you know for sure?
Why do I know it's not the application's fault? Because this is another one that I have built and it is the same problem. The first program was initially programmed, but there was no further completion of work on it. Unfortunately, but after the love of it, the employer does not want to start anymore. I read that the problem may be a large number of images in the application (there were about 50 pieces). So I cut the application but nothing helped. I decided to create an even tighter version from scratch (the application contains 3 windows and max. 10 images) + a few lists but the problem did not disappear.
edit:
The application does not even enter the start window, which is also a very simple menu (4 buttons) where the action should take place after selecting one of the four buttons.
(sorry for english but i use translator and may not spot possible translation errors)
We're not clairvoyants, so show off your blocks.
Exactly...
Place your .aia project here, or you can make a test project showing this problem.
it seems to be, you are using this extension by @Juan_Antonio
https://community.thunkable.com/t/paid-zoom-rotate-drag-image/22056?u=taifun
are you using any other extensions?
what happens, if you remove that extension?
how large are those images in MB?
see also tip 2 here
Taifun
Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.
Perhaps this extension is not compatible with appinventor. Remove the extension and see if the problem persists. You can use another platform to build the app, e.g. Kodular, which uses old android libraries. Sooner or later Kodular will also switch to the new AndroidX libraries, so there is a danger that your app will become unusable someday when you want to update it. Look for a different extension or fix the problem in a different way.
Yes, the cause of the crash is @Juan_Antonio's extension, as @Taifun suspected.
This works neither with AI2 nor with Kodular.
So this should have nothing to do with the Support
/ AndroidX
libs.
Thank you, as you wrote, the problem was this extension. I deleted it and the application starts normally. It is strange that everything works on the emulator, and it crashes after publication. Thanks again for your help.
@Jarekk
Here you can read
This extension works in Companion, Emulation but does not work when is installed.
Even your 10 images could still be problematic if they have not been optimised for Android. No matter how you deliver the images, if they are not optimised, there are many many phones that could lock-up or crash trying to handle large compressed images.
How were you able to decide you only needed 10 images instead of 50? To use the quantity of images required, there are methods you can use, the most obvious being to download them the first time the App is Installed and run.
Concerning the extension, you can drag/zoom in a WebView component, so you could load an image into a Web view via a very simple HTML file created by the App at run time.
It's not like I decided which pictures I needed and which ones to throw out of the 50. I was checking whether the fault lay in their quantity or something else. Now I have to dust off the old app and redo it a bit. But since we are already on the subject of enlarging images, maybe you know from experience what is the best method to zoom an image without losing quality? I tried and in webview (image on google drive) and extension by Juan Antonio and the image quality was identical in both cases.
Edit:
I would also like to mention that I would prefer the images to be in the application so that it can work offline, so I decided to use extension by Juan Antonio and not use webview.
The only way is to start with a large image and initially display it as a smaller one - that way, zooming up or down does not affect the quality. Note that PNG scales better than JPG.
It is generally better if an App can work offline. However, you don't have to store all the images inside the App, they can be stored in the App's "Application Specific Directory" (aka "ASD"). The App can load an image from there for viewing, on demand.
Thanks to your help, the problem with images has already been solved;)
I have one more question, maybe someone will see where the problem is. The application does not want to pass logging in despite setting Firebase in test mode (read and write set to "true"). Token and URL copied into the application. Through the application, I can save the login and password, but something does not want to go the other way and log me to Menu
- green works
- orange admin account (creating new accounts)
- the rest doesn't work
Maybe my colleague Tim can help with Firebase - assigned to him.