I've created an app using alloy framework for both iOS and android platforms. I'm having problems with the memory. My app uses a lot of tableviews with custom rows having images.
In the iOS simulator and device it uses a lot of memory even if I close all the windows. But the good thing is that it doesn't crash. But in android it crashes more often than not. android device crashes a bit later than the emulator.
Please Help. Tell me how can I manage these memory leaks. Thank You
Hey guys I found a way to get through these crash problem by using the destroy() function on the windows views on back, which in turn releases most of the memory.
Related
I am struggling with a strange situation with my Android app.
It runs on a 5.1 OS and the device is Rooted.
The app is running fine for a few days and then from an unknown reason it crashes (WIN DEATH without any exceptions from my logs).
I think it related to an internal memory leak on a specific Android model I'm using.
Anyway, I need to restart the app in cases like that.
Unfortunately, using 'Thread.setDefaultUncaughtExceptionHandler' method doesn't help because it won't handle those situations (the app is crushed).
I thought about creating a second app that samples the state of the process and if it is disappears from the process list, it starts the activity.
Is there a more elegant way to handle this situation?
Thanks a lot!
Asaf
Im considering creating a simple signature pad app in flutter and was considering getting one of the cheap <$100 tablets running Android Go with 1GB Ram like Lenovo M7 to use for that, cheaper and better value I believe than buying an actual signature pad.
Will flutter apps run on Android Go, and is 1GB memory enough for basic functionality?
Flutter is incredibly lightweight and has been proven to not be much more taxing than native if any more at all. How flutter works is it draws all the widgets on the screen. So flutter itself is relatively lightweight. So as long as you don't overdo with animations or classes in memory I don't see why not.
I recommend this article if you need more in-depth knowledge : https://medium.com/swlh/flutter-vs-native-vs-react-native-examining-performance-31338f081980
First question, appreciate some guidance. I am currently teaching myself to develop for Android and have installed my app (via Studio after builds) onto my own phone.
Every now and then my phone will restart itself (not querying that - these things happen).
During these (occasional) restarts I will get a message that Android is "Optimising App 1 of 1". I am pretty sure it is my app being "optimised".
I have searched here and the Web. Most of the questions seem to be users that have recently upgraded OS Version and that is causing the issue. There seems to be anecdotal evidence that wiping the cache cures this and that it only does it while the device is being charged.
However, if it is my app, I don't want users of my to go through this. I suspect it relates to the Target SDK I am using but it might be something different?
So, what is Android optimising? How can I make best efforts to stop my app being the cause of this?
Many thanks.
Earlier Android OS used to run on Dalvik Runtime which means apps used to compile at the time of execution. But now, Android has switched to ART with Lollipop version. It means all the apps will be compiled beforehand making them launch faster. So "Optimizing the Apps" basically means Android is compiling all the apps.
From Android 5.0, Android uses ART instead of DVM So every time your mobile OS upgraded This will happen. Also “Optimizing app” should happen only once after OS upgrade. If it’s happening every time then there is some issue in your mobile.
A factory reset should be probably solving this. (You have to go
through the pains of redownloading all your apps etc).
We have developed a react-native (v0.17.0) application for both iOS and Android. The iOS version is very responsive on physical devices. On Android devices I see a tremendous amount of variability. On Android version 5.1 the app is super responsive. On two separate phones with 5.1.1 (and both phones with much better specs) it is highly unresponsive. The navigation takes at least five seconds, TouchableHighlight buttons sometimes do not register at all. I have of course turned off dev mode but the issue still persists. My issue is that I can't see the degrade in performance on the emulator and this makes it hard to pin down the issue. Has anybody experienced and fixed a similar issue? What would be an advisable way to pinpoint the issue?
Disabling dev mode should help on android because it is super slow.
There are a little lack of details about what you are using or doing in your app. But i also had some performance issues in the app and could find the reasons for those by using the sysTrace wich is explained in the following link
https://facebook.github.io/react-native/docs/android-ui-performance.html
Maybe you can take advantage out of this.
Im making sockets on WiFi via threads. My app behaves very strange on Android 2.3.4 version, here it randomly restarts; whereas its running fine in versions: 2.3.6 and 4.0. Does anybody have an idea about this problem?
Do you have some finish() instruction in some exception try/catch?
Does your application consume a large amount of memory? (can you please check this)
Also, add some profiling tool / bugtracking tool to your application.
I'll suggest you some:
Bugsense.com
http://code.google.com/p/acra/ ACRA (to integrate with bugsense if you want)
Memory Profiling (http://developer.android.com/resources/articles/avoiding-memory-leaks.html + some talks from past google IO)