Skip to first unread message

Cesar Abenza

unread,
Oct 3, 2015, 12:44:31 AM10/3/15
to MIT App Inventor Forum
Hola a todos!

Eh realizado y publicado una app, está programada para que cuando el usuario hace click en el botón "atras" de su dispositivo, un notificador pregunta si quiere cerrar la app, aquí el problema, en el primer uso si cierra la app, pero si sigues jugando y el usuario va de "screen1" a "screen2" varias veces, cuando intenta cerrar la app, esta ya no cierra, le retrocede "back" entre las pantallas varias veces hasta que finalmente cierra la aplicación...

No entiendo el problema porque está programado para que cierre la app (solo hace cierra la app si el usuario pulsa salir en los primeros instantes de empezar a jugar).

Espero que me podáis ayudar a corregir el problema.

Gracias y un saludo!

SteveJG

unread,
Oct 3, 2015, 7:52:17 AM10/3/15
to MIT App Inventor Forum
How are you changing screens Cesar?   Are you using one of the safe recommended methods:


TribleHunter    http://puravidaapps.com/tribblehunter.php   Note, this method works after the apk has been built...use  the browser Screen button to change screens while developing... however when this code is in place in your app.   Having the close screen part of the change screen process will prevent the device's system memory from overflowing and crashing your app.   This method is more suitable in some apps than the screen manager Taifun frequently recommends  http://puravidaapps.com/manager.php.  They both work.  Sometimes one is more apropos than the other.

From your description you are possibly not closing Screen2 properly in your app.   Developers must close screens (except Screen1) when leaving them because not doing so gobbles up system memory.  When the Android runs out of system memory, it crashes.  Closing screens frees up system memory. It also means that you might have to 'close' the app several times before it, well, closes  Could this be your problem.

Try some blocks.  Using the advice above, you will probably fix your problem.   Let us know how it goes.
Regards,
Steve

Cesar Abenza

unread,
Oct 7, 2015, 12:32:26 PM10/7/15
to MIT App Inventor Forum
Hola SteveJG!

He leído los artículos de "puravidaapps" y efectivamente el error está ahí, como usted dice! No cerraba las diferentes screens cuando cambiaba de "una" a "otra" y la memoria se desbordaba...
Ahora comprendo la mecánicas de "cambio entre screens" :)
Muchas gracias amigo!

Un saludo y que usted siga ayudando a la comunidad!
Reply all
Reply to author
Forward
0 new messages