B4A Example Check if the application is running on a Chromebook - yo3ggx    Jan 16, 2023   (3 reactions) true if the device has a given system feature */
public boolean hasSystemFeature(String feature) {
return getPackageManager().hasSystemFeature(feature);
}
/** Returns {@code... B4A Question Do you have a fold-able device? could you test this routine - Robert Valentino    Oct 19, 2023   (1 reaction) ("hasSystemFeature", Array(Sensor_Hinge)) LogColor...I have a user that has a 4 Fold and is having problems. I want to be able to detect if the device is fold-able and wrote this code #Region IsDeviceFoldable Private Sub IsDeviceFoldable As Boolean Dim Sensor_Hinge As String = "android.hardware.sensor.hinge_angle" Try Dim jo As JavaObject... Other [new feature] b4xlib - a new type of library - Erel    Nov 2, 2020   (69 reactions)   tags: b4xlib;libraries, b4x library, Erel As B4X matures, more and more reusable components are written in B4X directly. In most cases it is simpler to implement the logic in B4X directly and the code can be cross platform. Especially with the relatively new XUI library. Standard libraries will never be cross platform as they are compiled to the platform native binary / bytecode. They also have other restrictions related to them being co... B4A Question IsChromeBook - Robert Valentino    Nov 17, 2018 ("hasSystemFeature", "org.chromium.arc.device_management", "java.lang.String"... B4A Question QRCodeReaderView - problem in a device without camera - toby (first post)    Nov 16, 2024   (1 reaction) ", Null) Return pm.RunMethod("hasSystemFeature", Array("android.hardware.camera... B4A Question [SOLVED] Disable GPS if not exist - Erel (first post)    Nov 26, 2019   (4 reactions) Sub HasFeature (Feature As String) As Boolean Dim ctxt As JavaObject ctxt.InitializeContext Return ctxt.RunMethodJO("getPackageManager", Null).RunMethod("hasSystemFeature", Array(Feature)) End Sub Feature: "android.hardware.location.gps"... B4A Question Check if device have touch screen or not - Biswajit (first post)    May 25, 2020   (8 reactions) result. I searched in this forum for hasSystemFeature (got from point 4) I found a post regarding that function. So basically you can check if the device has a touch screen or not as follows Sub HasFeature (Feature As String) As Boolean Dim ctxt As JavaObject ctxt.InitializeContext Return ctxt.RunMethodJO("getPackageManager", Null).RunMethod("hasSystemFeature", Array(Feature)) End Sub If HasFeature("android.hardware.touchscreen") Then Log("Device... B4A Library AndroidVideoCapture - video recorder that is 100% embedded in B4A (6 Jan - new Lib Files in post 48) - mvpmedia (first post)    Jun 27, 2016 videoWrapper.java:789: error: cannot find symbol
if (ba.applicationContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)) {
^
symbol: variable FEATURE_CAMERA_ANY
location: class PackageManager
Note: C:\MyCameraSurfaceView.java uses or overrides a deprecated API.
Note... Spanish GPS EN DISPOSITIVOS - bgsoft (first post)    Feb 11, 2014 ("hasSystemFeature", Funciones, "java.lang.String") End Sub Saludos... B4A Tutorial GPS / GNSS tutorial - IanMc (first post)    Apr 27, 2014 Is there a simple method to detect if a tablet has GPS ? Ah, I think I found Erels 'has feature' sub which should do the trick. Sub Activity_Create(FirstTime AsBoolean) Log(HasFeature("android.hardware.telephony")) End Sub Sub HasFeature(feature As String) As Boolean Dim r As Reflector r.Target = r.GetContext r.Target = r.RunMethod("getPackageManager") Return r.RunMethod2("hasSystemFeature", feature, "java.lang.String") End Sub... Page: 1   2   3   4   5   6   7   |