I have a gradation like below.
but the problem is when I see this on emulator (Android Studio Emulator)
it`s not very smooth it seems like very layered (photo below)
my programming language is flutter and android
why is this happening? how to solve this?
It uses a low-quality renderer so that it runs fast enough especially on less powerful hardware. Test it out on a real device and you'll likely see better results. I believe you may also be able to bump up the graphics on the emulator but not 100% sure if that would improve this. See here.
Related
I have been playing with optimizing my app, and I see that there are some general ideas on how much memory it should use... I'm running between 70-80Mb right now, is that a crazy number or just a little on the heavy side?
My second question is about the memory I am using. About 42Mb is taken up by graphics, whether I run the app with the layout graphics or run it without setting any views... any ideas on where to look? I feel like it is the theme, but I am not sure how to test that.
I've been searching for days to figure out why it uses so much and cannot figure it out. It remains constant regardless of which activity I am on, any ideas are welcome!
UPDATE:
I ended up running it on an emulator and got about 26Mb, more what I was expecting, but it runs at 70Mb with the 42Mb of graphics on the actual device.
The emulator allows for a 384Mb app after getting memoryclass information, while the device only allows 256Mb... the emulator has more storage and runs more efficiently.
The emulator is Android 8.1 27api while the device is Android 7.0 24api.
Tried on an older Android 5.1.1 api 22 below also.
Any ideas?
I have another question with about why the emulators have a such a difference in performance here if you know the answer on that, but I wanted to keep these questions separate: Other Question
Android Studio has an awesome tool called Memory Profiler. It helps you analyze possible memory leaks and see which calls are using up the most memory. You can even pause the processor and 'zoom in' to deep dive on the call stack.
You can use LeakCanary A memory leak detection library for Android and Java. Maintain by Square. This is one of the best developer's Tool for memory optimization and detecting leaks.here
I currently develop an hybrid app based on Cordova. My main target is Android devices with at least 2.3 support.
I face performance issues, particularly scrolling which is not really smooth and more generally navigation inside app. So I implemented several tips to increase my app speed such as:
Hardware acceleration
Use the fastest scroller I found (FTScroller)
Use hogan.js for view rendering with pre-compiled template
I tried Famousjs and CocoonJS but it didn't help. I look to crosswalk-cordova, but it increase the size of the app by 15-20mb and I have to keep the size as light as possible.
The app performs pretty good on powerful devices such as my Nexus 5, but it become slow on older/less powerful devices.
So what other tips could I use to increase the speed of my app ?
Many thanks.
"but it become slow on older/less powerful devices", does this issue happens when you are using crosswalk?
I guess on older/less powerful devices, if the performance drops dramatically, it maybe related the the GPU blacklist, Which means on some old devices GPU are blacklisted. To resolve this issue, you can pass '--ignore-gpu-blaclist' option,
see: https://crosswalk-project.org/#wiki/Use-Chromium-command-lines-in-your-apps-on-Android
I downloaded the samples from OpenCV for Android and let them run in eclipse on a real device (Nexus 7). They all work fine, but when I'm looking at the LogCat log, I see ca 20 errors displayed for each frame. The log is filled with them. Although all the samples work, this irritates me and makes it hard to debug the code.
Here a screenshot of the log:
Does anyone know where these errors come from and what they mean?
Should I worry about them, if no: can I somehow hide them? if yes: what to do?
Another question:
I get, when running the JavaCameraView idle (Sample CameraPreview) only 15fps max. This is few, isn't it? Or is this always like this when using OpenCV with Java (over JNI) instead of c++?
Thanks in advance for any hints!
Isa
The next OpenCV version will fix a few camera bugs, maybe it fixes those messages. There is one specific to Nexus 7 2013, but looks different from yours.
JavaCamera is usually slower than NativeCamera but more stable (less buggy). But it also depends from other factors like ambient light (less light = slower), chosen resolution.
Im testing my new game prior to release and i have found that on some devices the Z positions seemed to be mixed up in some cases and objects that should appear on top were appearing underneath.
I'm running opengl es 1 and it runs perfectly on my Samsung Galaxy S2 (and all the samsung devices i tested on) but went wrong on a HTC Desire.
Does anyone have any ideas?
Can you provide us with some pictures and source code? Common depth buffer problems cause some banding problems but your problem seems more related to some default driver state that is set differently value depending on which hardware are you running on.
I suggest you to generate a very simple example and start from the scratch until you find where is the problem, I don't think we can help you with so little information.
Hope that helps.
i am developing an application for android 4.0. that app in emulator is looking in good size but when we check that application in real device, all images in apps are being very small in size. what should i do? please help me.
If I am following you correctly you are under the illusion that the emulator will mimic a device exactly? And that because your design looks good on the emulator it will translate exactly over to the device?
If that assumption is correct then you need to be aware that the emulator is never going to give you that kind of accuracy. From my own experience the emulator will help as a guide but it cannot and should not really be used as a like for like match against a set or specific device. This all comes down to the fact that different phone manufacturers use different chipsets and render their screens differently to each other. The best thing you can do is to effectively follow the guidelines here http://developer.android.com/guide/practices/screens_support.html to provide a layout that closely resembles what you want.