Is there any way (or any API) that we can use to check if TSP Hovering is supported by android devices?
There are listeners added in android API 14 i.e. View.OnHoverListener. But this does not show if Finger Hover is supported.
Here is link which describes Samsung doesn't provide any such API.
I want generalized solution using Android APIs.
Does anyone have any idea about this or any hack ?
Related
I'm starting to work on a project where we need to access the 2nd screen of a dual screen phone, we are using Xamarin. I cannot find any documentation on how to do this. Is anyone aware of a way to do this?
The above comments are focused on second external screens, which is mostly what was around in 2019 :)
Now there are multiple dual-screen devices, including the Microsoft Surface Duo, and a couple of different styles from Samsung (Galaxy Fold/2, Galaxy Flip).
If you're using Xamarin.Forms, there's a TwoPaneView layout control that specifically detects and adapts to dual-screens, and also a DualScreenInfo helper class for device metrics. Get started docs and more details are available on learn.microsoft.com. Check out these samples and this GitHub repo. These APIs are currently hardcoded for the Surface Duo device.
If you're using Xamarin.Android, you have two options:
Microsoft's DisplayMask API, which is surfaced in the Xamarin.DuoSDK NuGet package. This is also targeted just at the Surface Duo - the GitHub repo has Xamarin.Android samples showing how it works.
The binding for Android's Jetpack Window Manager, in Xamarin.AndroidX.Window NuGet package (currently in alpha). This is the 'generic' API that will work on folding devices from multiple OEMs (eg. Samsung). Because it's still in alpha (as of April 2021), there aren't a lot of samples around but better support is coming.
I recently learn how to implements a Google map in my app. It works very well on Android 4.** devices, but then, I try on a 2.3 device and the map now looks like this.
No map, but the UI looks fine, and the distance between the two points sounds good.
I would like to know what's wrong, and I assume it's not a Google API key problem since my app works on more recent devices.
Thanks in advance.
Try Hardware acceleration when you set the view.
http://developer.android.com/guide/topics/graphics/hardware-accel.html
EDIT : Apparently the link I pointed to is says HW Acceleration is only for 3.0+
Thanks #WarrenFaith
Since you see the grid, this is not an API key related issue. When the key is wrong, you can see only gray background and zoom buttons.
This is a connectivity issue. Make sure your device can reach internet and download tiles.
You have to check that the device has OpenGL v2 support:
Specify requirement for OpenGL ES version 2
The Google Maps Android API uses OpenGL ES version 2 to render the
map. If OpenGL ES version 2 is not installed, your map will not
appear. We recommend that you add the following element
as a child of the element in AndroidManifest.xml:
This notifies external services of the requirement. In particular, it has the effect of preventing Google
Play Store from displaying your app on devices that don't support
OpenGL ES version 2.
Here you have the link: https://developers.google.com/maps/documentation/android/start?hl=es#specify_requirement_for_opengl_es_version_2
I am using systrace to dig into the performance issue in my app, I am wondering if there's a way to add a tag / marker when certain event happens in the systrace result? The specific event I am looking for is input event, but it's hard to tell from systrace which input event is which. I am on Android 4.2.2
Cheers,
Johnny
You can, using android.os.Trace, but the feature wasn't added until Android 4.3 (API 18). You can find an example here.
Seeing as there are smartphones with 3D displayes coming out on the market I was wondering if it was possible to render in stereo using the Android 4.0 SDK. On a desktop I'd basically do the following:
glDrawBuffer(GL_BACK_LEFT);
//Draw image for left eye.
glDrawBuffer(GL_BACK_RIGHT);
//Right eye.
So far I couldn't find out how to do this with the Android SDK. Is there any related call with a different naming or does this simply not exist in the official SDK yet? If it doesn't, is there any other Android/OpenGLES SDK out there that allows to do this?
Thanks and cheers.
Unfortunately, I don't think there's a unified way of doing this. Each manufacturer has their own specific implementation. As far as I know it's all high level stuff, so probably not what you're looking for.
For HTC, it's in the OpenSense SDK:
http://htcdev.com/devcenter/opensense-sdk
For LG, there's a package in the Android SDK Manager called "Real3D by LGE". It's API level 10.
Is it possible to enumerate all the displays supported by an Android device? The APIs currently support getting the default display, but don't appear to support getting any other displays.
I did not find any official API for multiple device displays, even if it looks like it will support it in the future.
No, it is not, I think you're confused about what getDefaultDisplay does, it gets the display of the current device, not the global Android default, which does not exist! For information about screen sizes/densities look at the documentation.