Android Profiler alternative for older devices - android

In Android Studio 3.0 Android Monitor was replaced with Android Profiler, but it can't be used for pre-Lollipop devices.
Is there a way to watch CPU and memory real time data for older devices in Android Studio 3.0? I tried Android Device Monitor (under Tools->Android) but I can't find such a tool.

actually I was havign the same problem. The solution is to use the Android Device monitor, you can find it:
AndroidStudio -> Tools -> Android -> Android Device Monitor
Procedure
Restart adb, so that android device monitor can capture the device. You should see your device listed on Devices tab
After this select the process for your app, it should have the same package name.
Initiate method profiling recording by pressing
At this point your should run the app or activity that you would like to profile, when you're finished to use the app press
After stop you should have a new tab showing the trace file for captured process.
There you have it, now all you have to do is find the heavy cpu methods and look for optimization.
More reading:
https://developer.android.com/studio/profile/traceview.html
https://www.grapecity.com/en/blogs/android-method-profiling-with-ddms/

Related

How to run flutter app on a real device without having to install the sdk on your phone evrytime

I use my mobile device to run my flutter applications. I know all about the hot reload but I'm so tired of having to wait every time I connect back to my phone again maybe the next day and then the app has to be re installed and the gradle task assembler has to be built again. Please I want to ask if there is a way to reconnect easily and a way for the apps to run easily again any time I want to work on a project again after a while.
There are a couple of alternatives to building the APK and installing it on a physical device:
Use an emulated android device
You can use an android emulator. The easiest way to set that up is probably the graphical interface in Android Studio (see https://developer.android.com/studio/run/managing-avds), but you can also use flutter emulators --create [--name <Name>] to create a new virtual device. Then use the button in the bottom right of VS Code to select that device, before launching the debugger.
Build for desktop
Depending on the dependencies of your app, you could try building the app for the platform you're developing on (Windows, Linux, or macOS). This has the same visual result as an Android app, but does not need an emulator or physical device. The rendering engine is the same (Skia) on all platforms. The obvious downside is that some plugins may not be available for desktop.
See https://docs.flutter.dev/development/platform-integration/desktop on how to set that up.

Android Studio CPU Profiler: "No data available for the selected time frame"

I use Android Studio 3.6.3 on Ubuntu workstation. Recently, I needed to find a bottleneck in the code of my application. I launched the profiler and tried to record application activity using Trace Java Methods option.
Faced a problem: only part of the application activity is recorded (for some reason, only the first "peaks" of application activity). For the remaining "peaks", the message "No data available for the selected time frame" is shown.
How to solve this problem?
Tried to use Android Studio CPU Profiler on Windows 10 workstation - the same problem.
Are the alternatives to Android Studio's CPU Profiler to do the same thing?

Install actual android device not just skin on Android Studio/Virtual Machine

I am trying to run some tests of an Android application I am developing. The question I have is if it is possible to create an actual android device with its settings not just skins and the device's layout using Android Studio or a Virtual Machine, in order to see how application operates on other devices.
Would really appreciate if anyone could help.
You can use AVD Manager in Android Studio. You can create Android VM with it. You can customize :
What Android Version runs on it
The device screen size
memory
camera
storage
You can send custom inputs
Physically moving the device
Custom GPS coordinates
Send sms and call
Change battery level
etc
It is more than a skin, you can access the file system with adb, navigates the settings etc.
What you can't do is having the custom software layers made by manufacturers (i.e. OneUI from Samsung). It is stock Android
The emulator seems to be a standard qemu running a complete android system, so it's not only a skin.
If you want to test on real devices, you can have a look at Firebase Test Lab, which offers actual devices for testing, for a fee. See https://firebase.google.com/docs/test-lab/android/available-testing-devices on how to get the list of devices. Another option is Browserstack, which seems free for open source projects.

How can i start my app written with libgdx on my android device?

I have written some codelines with libgdx in eclipse and want to run them on my android device.(It's a tablet)
But i cant find out how to do this.
I even cant run it on the android emulator provided by the android sdk. I get an error that the app stopped unexpectedly.
The app is working fine with the desktop launcher...
I hope someone can explain me how to get it working on the emulator or on my android device.
I saw somewhere that simply connecting my device via usb should be enough that eclipse is able to create an temporary app on the device, but this also didnt work.
Regards
1st of all, download SamsungKies[latest], to get and install proper USB Drivers. Its important that it should be the latest, cuz there was a bug in the previous versions.
Now that you have the drivers, simply connect your device to your machine IN USB DEBUGGING MODE.
Go to your main activity, and run.
If it launches in an emulator, close the emulator, and again in main activity, select run configurations -> Android Applications -> target -> always prompt to pick device.
Run again, and it should install and run in your phone/tablet.
NOTE:The activity closes in emulator because, by default, the emulator doesn't support OpenGLES emulation, its too heavy for your CPU.
i know its kinda late, but i hope it helps others:)

Adobe cirrus android application exit/restart without any errors

Greeting.
I'm currently working on a crossplatform test project that involves adobe cirrus for video chat and such. The application is written in Flash builder 4.6 standard (no profiler option) in flex and A3 and the target platform is Windows and Android.
Both use the same code and strangly the windows version works well without any freeze/unespected termination, but the android one somtimes just quit out of the application back to the android homescreen after using the video chat. And when i reselect the application window, it seems like it has restarted.
I tried to run the application in "debug" mode on the device, but there's no error poping up when the application crash/exit just a "terminated, exit value: 0" message.
I'm using resource monitor app to monitor memory and cpu to check if it's a out of memory issue, but the app seems to use a stable 60-70mb of the memory leaving about 280-300mb left and the cpu is at the highest on 80%.
I also tried to alter needed phone "right" to everything, even if I really only need phone wifi state, internett and camp&mic.
I'm not running any other apps beside the resource monitor and the test app when testing.
So any clues?

Categories

Resources