I'm creating an Android application and it's nearing completion. Unfortunately, it currently breaks the System UI when I click the square for showing all the applications running when the app I'm creating is open. Any ideas as to why this is happening? Is it using too much memory?
Related
I have a Linux audio application for Android built by NDK. The Android application is structured as follows: Java launcher launches the binary components of the Linux application and launches the X server Xsdl (http://www.tinyware.ru/hifiha/) for rendering. At this moment, the focus switches to the X server and the Android application itself goes into the background and its processes stop after 1-2 minutes. If I return to the application, then it starts working again, but I need the X server to be drawn on the screen. The power management settings for the application in MIUI do not give the desired result, but this is also reported on the Internet, which is typical for Xiaomi. Please advise what can be done about this?
Thank you.
We have a (rather complicated) Qt application, with port to Android. It worked quite OK - until we started trying it on Android Pie.
Sometimes, either after start, or after return from background, application visually freezes - however, logging shows that UI thread is alive, it responds to taps, widgets receive paintEvent()'s and process them. But nothing changes on screen.
Hardware buttons like 'Back' also work - application is able to show 'Are you sure to exit?" message box and it works properly.
Also, you you try to go ot home screen and back to app - most of the time it unfreezes.
Actually, this behavior started on Android 8, but was resolve with a dirty hack - doing hide/show for main widget upon receiving applicationStateChange(Active). But it stopped working on Android 9.
I am completely out of ideas what could we do to produce such behavior, and how to fix that...
After a long and rather tedious debugging we finally narrowed it to a problem in Qt itself.
I've reported a bug: https://bugreports.qt.io/browse/QTBUG-76142
However, I don't know whether it was fixed in newer releases, since we stopped development of Android apps for now.
This is not an actual solution, but shares some ideas. I used QT 6.3 and the same hang/freeze problem occurred in qt android app (arm64-v8a / Qt widgets) after returning from background or after phone auto off when app is opened and after return to phone on. Another consequence is that after sending the app to background, I can't use Google chrome properly (I only tested this app, not other apps). What happened is that it's very slow and scrolling in Chrome doesn't work as usual.
I suppressed this problem with this trick (not a solution): i.e., before sending the QT app to the background, I triggered it to show a message box (from clicking a button) and let message box open. Now the Google Chrome app worked normally. And after dragging the QT app to the front and giving OK to the message box, I was able to use the application as usual. No hang/freeze problem.
Also I read an article from a link (https://lists.qt-project.org/pipermail/interest/2014-November/014218.html) : That is, we can able to modify the QtActivity.java (which can communicate to the QT app) and use the on pause and on resume event. So what I thought is that, If I trigger the app to show Qt message box from this "on pause" event, and automatically close the same in the "on resume" event this hang/freeze can be handled.
But I didn't try above (modify QtActivity.java) because now I switched to QT 6.4 and hang/freeze problem is not present in this version.
I'm working on an application which contains a transparent screen and I need other applications such as Google Maps to run behind it, is there a way to run 2 apps simultaneously ?
Currently when I open my app all I see behind it is the menu displaying all opened apps, but can't figure out how to keep apps running behind mine.
I'm working on an application which contains a transparent screen and I need other applications such as Google Maps to run behind it
Given the fact that other developers write those other applications, you have no reliable way to knowing exactly what the user can see through the transparent portion of your UI. That will vary based on device, version of the other app, etc.
Currently when I open my app all I see behind it is the menu displaying all opened apps
What is visible through your transparent portion of your UI is whatever activity happens to be behind it.
can't figure out how to keep apps running behind mine
The decision of what other apps do is up to the developers of those other apps, not you.
is there a way to run 2 apps simultaneously ?
You are certainly welcome to start some activity (e.g., a map), and then some time later start some other activity (e.g., the one of yours with the transparent pane). What the other app does, when you do this, is up to the developers of the other app, not you.
This might be a bit of a stupid question but my application seems to stay running even after I have stopped it. I close it by holding down the home key and dragging the application off to the left. However, I still see logcat output, it only stops if I go to settings-->Apps-->Running Apps and stop it this way. Is this a bug in my application or is this expected android behavior?
This is expected . Android behaviour
Unlike many other Operating Systems, Android does by default not have a dedicated button to close an application manually. This is because Android is designed to manage the running applications itself and close them as needed.
By design, Android handles the memory and time assigned to applications. This ensures that applications that are left opened do not cause the smartphone to slow down or run out of memory.
When pressing Home button, your app will go to the background and Android O/S will close it when low on memory. If not and you open the application again, it resumed where you left off.
Unless you specifically create a method in your application that closes (finishes) your app.
i am new to android development and had question regarding custom screen saver.
The requirement is for a tablet which will always be plugged in so battery life wouldn't be
an issue. The required app should behave as a screensaver in that during inactivity, the tablet should launch this app which contains a flash file that displays a series of images and video. When activity is resumed then the tablet takes the user back to the program they were using.
Can this be done via an app without requiring any hacks?
cheers,
abhi
There is no concept of a "screensaver" in Android.
There is the lock screen, which can be modified via custom firmware, though AFAIK it is implemented in Java as part of the OS and therefore could not be replaced via a Flash APK.