Android Studio - AVD doesn't recognize gestures (cant unlock emulator) - java

I just started learning to program for android and sadly after making one program (Hello World) I have already ran into an issue. The gesture for "Swipe to Unlock" or for the camera are not functioning. I can bypass it on the stock emulator because it shows a notification i can click that will skip the screen, however i would much rather just figure out a solution, i have searched around on Google and StackOverflow to no avail... maybe someone can help out.
Thanks in advance,
Jon

ok solved! for those that might have the same problem, just press f2

adb shell input keyevent 82
I had the same issue and grew tired of it, this always worked.

AVD_WXGA_TABLET emulator.
Android v 7
F2 does nothing.
Dragging with left-down mouse tries to do a swipe up but bounces back down when I release the mouse.
I've tried fast and slow, release on the virtual device or off it. Short and long strokes. You name it...
The f'ing thing won't unlock. And for all the keystrokes available in the tool pallet including fingerprints, there is no simple swipe-left/up/down/right. You'd think they would have had cntrol-alt-arrow for that out of sheer common sense or as the result of the developer trying to use it.

In my case, I just restarted the simulator by holding down the "Power" button in the simulator menu for a couple of seconds and then choosing "Restart." I was able to unlock the simulator easily after that.

I'm not sure exactly which step solved it, maybe all, but these were my steps
Use the SDK manager to update to the latest version of the emulator
Turn off the emulator (hold the power button and select Power Off)
Close Android Studio
Reopen Android Studio
Launch the emulator from the AVD manager

On mac you can keep holding the command key and then do the swipe gesture with the mouse or trackpad of your computer.
Video

Try using one of two ways
Swipe up from top section of screen
Swipe up from bottom section of screen i.e. just above the navigation buttons.

Related

Displaced taps in an app (can't tap near right screen edge)

Hello everyone I don't have much programming experience, but I installed an apk for an app. (The apk can be found here: https://s2.rexdl.com/android/game/The-Walking-Dead-Season-One.1.18-Adreno-www.ReXdl.com.apk )(It works with a custom obb, but the obb is most likely not causing the error, but if you need to look at the obb file as well, here it is:https://s2.rexdl.com/android/game/The-Walking-Dead-Season-One.1.18-Adreno-www.ReXdl.com.rar ). But I have a problem: when I tap anywhere on the screen, my tap is displaced a certain distance to the left, so I have to aim a little bit right to where I want to tap, could anyone please tell me a solution to this, or modify the apk to solve the problem. Also, don't ask me to contact the developer, the app is no-longer supported by the developer- that is why I am asking the question here. Thanks, John Doe.
I was expecting the taps to be in sync with where I tap the screen, but the taps are displaced to the left. I tried tweaking some layout settings to no avail.

Camera stays blank on Oxygen4 (Android Nougat) with an OnePlus 3

I've the problem that some users with an Oneplus3 and the most recent Oxygen 4 version (Android Nougat) don't see any camera preview image anymore (it stays blank/black). The UI elements are still visible.
They also said in previous versions of oxygen OS the app was working correctly. I found out, that other apps got the same behaviour and fixed it, recently (i.e. Google's Cardboard Camera). But I don't know how to fix it and don't have a test device like the OP3.
I'm using the min SDK version 14 and the Camera API v1 with a SurfaceView to show the camera preview. On my phone (LG G4 with Marshmallow) the app works as expected.
Is somebody of you familiar with that issue and know how to fix it? What else can I try to solve that problem? Can you reproduce that issue on others phones with Android N, too?
You can find the source here: https://github.com/kloener/visor-android
For testing you can directly download it from Google Play (https://play.google.com/store/apps/details?id=de.visorapp.visor) or on github-releases (https://github.com/kloener/visor-android/releases)
kind regards and thanks
They need to give camera permission from application settings. I know they accept it while setting up app. But for Nougat user need to give an extra permission.

Problems with turning off the autofocus on Android phone

Working on my Samsung S6 camera calibration as a first step for further app development.
One of the perquisites for correctly working app is that the autofocus is disabled.
I used something like this:
mCamera.cancelAutoFocus();
Camera.Parameters mParam = mCamera.getParameters();
mParam.setFocusMode(Camera.Parameters.FOCUS_MODE_INFINITY);
mCamera.setParameters(mParam);
Previously, I checked that the "infinity" focus mode is available on my device.
Still, when running the app, I can clearly see that the focus is changing depending on the distance of the object in frame. "Fixed" mode is not available.
Am I doing something wrong?
I just want to have focus that will not change while running app.
I'm using OpenCV3.1 with Android Studio.
Olivier's answer helped me alot.
Did it as it is described.
Had to edit layout a bit.
Put the setInfinityFocusMode under the onCameraViewStarted.
Thanks Olivier ! ;)

Android java 2.3.3, how to create a menu like steam?

How do you make a steam like menu?
Below is a screenshot from my Samsung Galaxy S. The menu unfolds when you press the menu button on the bottom of the phone and it pushes the current window to the side and displays the menu. So it steals 70% of the screen. Question is, how is it built? I don't even know where to start building something like this. Any ideas? Tutorials?
Should be compliant with android 2.3.3.
Use Jeremy Feinstein's SlidingMenu library. It works very well and actually performs smoother than the Steam implementation of it.

libGDX Causing Multitouch Problems

I am working on a game with a virtual joystick in the bottom right corner of the screen and a "move" button in the bottom left. So you use the joystick to point the character in the right direction and press the "move" button to go forward in that direction. This was all working great until today and now when I press on the screen to go forward my joystick is being affected. I know it is not a coding problem because I haven't opened the file that handles touches for 8 days and it has been working fine. Also after I close my app and then use another app that is completely separate from libGDX the multitouch is having the same issue. So do you guys think this is a problem with libGDX, my device, or am I just not coding the multitouch correctly for libGDX? I am using a Stage and the controls are Actors on the Stage I should note that after I restart my phone, the other app that is not using libGDX works correctly. It is only after I open my libGDX based game. So frustrated with this that I am about to give up on libGDX. I am happy to post any code that is requested.
EDIT: Please see comments below. This seems to be a specific issue with the Galaxy Nexus and probably some other Samsung devices as well. This libGDX based app has had no issues on other devices such as original droid, and ASUS Transformer tablet.
Turns out this is not a libGDX problem at all... Nor was it a problem with any of my code. There seems to be a bug in the way the Galaxy Nexus handles multitouch. You can view the bug report at this link. Seems that as of 4.0.4 there still is no fix for this bug. I am still currently running a VZW Galaxy Nexus with 4.0.2, I guess all we can do is wait and put a disclaimer in our games until (if ever) it is fixed.
By locking and unlocking the device, the problem does go away (sometimes), but will quickly come back if I go to my homescreen and re-open the app.

Categories

Resources