B4A Example Check if the application is running on a Chromebook - yo3ggx    Jan 16, 2023   (3 reactions) If you want to check if the application is running on a Chromebook (for example to do some specific GUI reconfiguration to run in a resizable Window), you can use the following routine.
Hope it helps. Returns true if is a Chromebook, False otherwise.
Sub isChromebook As Boolean
#If JAVA
import andro 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) Use the forum search. If there is no thread/post regarding your query, then Use google to check if it's actually possible or not. If possible search for the relevant code. Use the forum search to search for the functions or methods used in that code. If there is no answer to your query then Try to p B4A Library AndroidVideoCapture - video recorder that is 100% embedded in B4A (6 Jan - new Lib Files in post 48) - Johan Schoeman (first post)    Jan 04, 2016   (1 reaction) Hi Steve
If you can, please try with the attached library files. Have changed a call in the library from hasSystemFeature(PackageManager.FEATURE_CAMERA) to hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY)
Also comment the two lines as what I have done in the following code (lines 129 and 130):
B4A Question sdkmanager help needed. - Johan Schoeman    Oct 27, 2024 } } CAMERA_BACK = cameraId; return cameraId; } public boolean hasFlash() { /* * First check if device is supporting a flashlight or not */ hasflash = BA.applicationContext.getPackageManager() .hasSystemFeature(Packag B4A Library Android Vision Barcode Scanner (Scan QR Codes and other 1D & 2D barcodes) - Johan Schoeman (first post)    May 01, 2016   (2 reactions) } } CAMERA_BACK = cameraId; return cameraId; } public boolean hasFlash() { /* * First check if device is supporting a flashlight or not */ hasflash = BA.applicationContext.getPackageManager() .hasSystemFeature(P B4A Question Screen lock problem - Elyza (first post)    Aug 18, 2024 On devices not supporting PackageManager#FEATURE_SECURE_LOCK_SCREEN feature, calling this methods has no effect - the password is always empty - and false is returned. Requires the PackageManager#FEATURE_SECURE_LOCK_SCREEN feature which can be detected using PackageManager.hasSystemFeature(String). B4A Question RuntimePermission - Camera - Johan Schoeman (first post)    Jun 17, 2018 hasSystemFeature(PackageManager.FEATURE_CAMERA_FLASH); return hasflash; } #End If The inline Java code uses the camera and reports correctly before the permission was checked and added.? B4A Example Have Back and Front Camera's & has Flash (inline Java code) - Johan Schoeman    May 01, 2016   (8 reactions) // Search for the back facing camera // get the number of cameras int numberOfCameras = Camera.getNumberOfCameras(); // for every camera check for (int i = 0; i < numberOfCameras; i++) { CameraInfo info = new CameraInfo(); Camera.getCameraInfo( B4A Question Do you have a fold-able device? could you test this routine - Robert Valentino    Oct 19, 2023   (1 reaction) 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" Page: 1   2   3   4   5   6   7   Powered by ColBERT |