Record Android Screen Problem Using Android Studio - java

When I press on vertical ellipsis
Screenshot 1
It show me this window, So I press on Start Recording
Screenshot 2
Then it show me this error
Screenshot 3
How can I solve this problem?
record the screen on my Emulator
Screenshot 4

Did you allow the permission to the camera in you'r manifest.xml
must add this
<uses-permission android:name="android.permission.CAMERA"></uses-permission>

Maybe it's a bad solution.
But if you need a fast solution. Record the whole screen and crop it so you can only see what you really care about.

Check out this cli tool: https://github.com/Genymobile/scrcpy
It works very fast and you can record the screen directly to video file with command:
scrcpy --record=file.mp4

Related

Sparkfun nRF52832 breakout board not connecting to BluetoothLeGatt source code from Android Studio

I am trying to pair my Sparkfun nRF52832 breakout board (programed through Arduino, using this link: nRF52832 Breakout Board Hookup Guide with a BLE android app (which I hope to make) so that I can turn on/off the LED on the board (baby steps). Since I am new to Bluetooth LE, I decided to use the BluetoothLeGatt source code on Android Studio. After going through the code, I understand how it works.
Picture of the BluetoothLeGatt source code sample page (image)
I connected my Samsung Galaxy S8+ and installed the BluetoothLeGatt source app to see if it can scan for the nRF52832. At first I got a red text in the logcat which said that I needed to give Coarse location permission, so I did that in the manifest.xml. Then I ran it again, but I still got the same red text in the logcat.
At first I googled the problem and found this somewhat similar question, however, I wasn't able to get a suitable answer. I also tried to see if I could find source code for the nRF connect app, however, that is also not available. So I'm super confused about what I should do to get rid of that and need help.
manifest.xml file with permissions (image)
Red text in logcat (image)
Thank you for taking the time to read my first post! I truly appreciate any help you can provide.
You need to request this permission in runtime.
More info: https://developer.android.com/training/permissions/requesting.html

Can I start Android App not in FullScreen mode?

I saw that youtube app can minimize to small window that displays over all other windows.
I want to do the same with my app.
What strings in manifest (or any other string) do it?
Thanks,
I am about this:
Take a look at google documentation about this topic, it is called picture-in-picture
You need to add the first two lines to your activity which will handle Picture in Picture (PIP) mode.
The third line needs to be added so that your activity will not relaunch once layout changes occur, such as device screen rotation.
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
You can find more information about this in the android documentation.
Here is a tutorial on how to implement it.
You can refer to the following tutorials which are nice to understand
picture in picture feature
https://medium.com/#mujtahidah/making-picture-in-picture-android-4120ac73efb4
http://www.zoftino.com/android-picture-in-picture-mode-example

Screenshot is not supported below API 14

I am trying to get a screen shot of the android studio emulator running on API-10. Unfortunately I am getting the following message:
Can anyone explain why is that so and is there any other easy workaround to this except Print Screen (since it does not produce the same image quality and one needs to crop the image manually)?
The solution has been within the Android Studio itself:
1- Click on Android Device Monitor
2- On the left, there is a tab named Devices . Find your emulator name and click on it.
3- In front of the Devices tab there are a set of icons. Find the Screen Capture icon and click on it.
4- After the Device Screen Capture window opens, wait until your emulator's current screen is captured.
5- At last, you can save the quality image by clicking on the Save button.

Android: Launch application and take screen shot

It is possible, that my application launches when a certain app (app-xyz) starts. and take screen shot on every click in app-xyz.
regards
No. This is for security- if you could do this, you could take screenshots of people entering passwords. The only way to take a screenshot if you aren't the active activity is to use adb or similar tool.

Android app force closes when theme is set

I'm just getting started with Android dev, done a few tutorials, now I'm working on a simple app. On both the emulator and my phone (Android 4.0.3 emulator, Android 4.1.1 Atrix HD) apps are displaying in what I think is Holo Light. I'd rather have it be Holo Dark, but when I add the following line to the application block in the Android Manifest file: android:theme="#android:style/Theme.Holo" the app compiles fine but force closes as soon as I open it.
What am I doing wrong? I'm sure it's something really simple, but as I said I'm new to this. Thanks in advance, y'all!
If you want to use a theme for all the activities of your application then you need to use
<application android:theme="#style/CustomTheme">
in AndroidManifest.xml.If you want a theme applied to just one Activity in your application, then add the android:theme attribute to the activity tag instead.So need to know what type you use in your application.However see these things which will clear you more..
http://developer.android.com/guide/topics/ui/themes.html
http://www.androidengineer.com/2010/06/using-themes-in-android-applications.html
The simplest thing you can do and you should always do is to read logs why does it crash. The log will tell you the reason of you crash. Please post the reason including logs from Logcat and only then ask about fixes:)

Categories