Tutorial by Examples: device

To make an app more cohesive, we often need to keep user's personal settings and preferences consistent across multiple devices that have been logged in with one Microsoft account. In this sample, we use roaming data to store and to load UI settings, game process and user info. But the roaming data ...
When sending a notification to an iOS device, you must set priority: "high" for it to wake up. Otherwise, the notification will not be received while the phone is asleep. Sets the priority of the message. Valid values are "normal" and "high." On iOS, these correspond...
This example shows how to take image and display it correctly on the Android device. Firstly we have to create sample application with one button and one imageview. Once user clicks on the button camera is launched and after user selects picture it will be displayed with the proper orientation on ...
You can qualify a whole folder folder for a specific device type, its files will override the ones outside it on that device: / DeviceFamily-Mobile PageOfEden.xaml MainPage.xaml MainPage.xaml MainPage.xaml.cs PageOfEden.xaml PageOfEden.xaml.cs Files inside the qualifying folder won...
Introduction Texas Instruments' (TI) CC26XX series SoCs are readily available wireless MCUs targeting Bluetooth Low Energy (BLE) applications. Along with the MCUs, TI offers a full-fledged software stack that provides necessary API and sample codes to help quickly get developers started with the to...
First, add the following permissions to the manifest of your project in order to enable device storage access: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> ...
UIDevice *deviceInfo = [UIDevice currentDevice]; NSLog(@"Device Name %@", deviceInfo.name); //Ex: myIphone6s NSLog(@"System Name %@", deviceInfo.systemName); //Device Name iPhone OS NSLog(@"System Version %@", deviceInfo.systemVersion); //System Version 9.3...
UIDevice *deviceInfo = [UIDevice currentDevice]; int d = deviceInfo.orientation; deviceInfo.orientation returns an UIDeviceOrientation value which is shown as below: UIDeviceOrientationUnknown 0 UIDeviceOrientationPortrait 1 UIDeviceOrientationPortraitUpsideDown 2 UIDeviceOrientationLandscap...
//Get permission for Battery Monitoring [[UIDevice currentDevice] setBatteryMonitoringEnabled:YES]; UIDevice *myDevice = [UIDevice currentDevice]; [myDevice setBatteryMonitoringEnabled:YES]; double batLeft = (float)[myDevice batteryLevel] * 100; NSLog(@"%.f",batLeft); int d = myD...
Device can be rotate by changing orientation in XCUIDevice.shared().orientation: XCUIDevice.shared().orientation = .landscapeLeft XCUIDevice.shared().orientation = .portrait
Add this lane to your Fastfile and run fastlane installAll type:{BUILD_TYPE} in command line. Replace BUILD_TYPE with the build type you want to build. For example: fastlane installAll type:Debug This command will build all flavors of given type and install it to your device. Currently, it doesn't...
While using Image/Colour as an background in a CardView, You might end up with slight white paddings (If default Card colour is white) on the edges. This occurs due to the default rounded corners in the Card View. Here is how to avoid those margins in Pre-lollipop devices. We need to use an attribu...
JMeter can also can be used for recording mobile performance testing. Mobile scripts recording is very similar to web application scripts recording. Configure JMeter Configure “JMeter Templates” as specified in chapter 1. Configure your mobile phone After the JMeter configuration is prepared...
First Add Storage permission to read/fetch device directory. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> Create model class //create one directory model ...
Here we can create UUID String with in one line. Represents UUID strings, which can be used to uniquely identify types, interfaces, and other items. Swift 3.0 print(UUID().uuidString) It is very useful for identify multiple devices with unique id.
Go to Hardware -> Device:
Sometimes, the straight forward loop cannot be entirely contained within the loop body. This is because, the loop needs to be primed by some statements B. Then, the iteration begins with some statements A, which are then followed by B again before looping. do_B(); while (condition) { do_A(); ...
To allow multiple user registration on Ejabberd server, we need to configure file ejabberd.yml in Ejabberd latest versions. Configure ejabberd.yml like: in access_rules: add register: - allow register_from: - allow registration_timeout: - infinity mod_register: acc...
Sometimes Android's logcat is running infinitely with errors coming from some process not own by you, draining battery or just making it hard to debug your code. A convenient way to fix the problem without restarting the device is to locate and kill the process causing the problem. From Logcat 03...
Ffmpeg is a swiss knife for streaming project. For any kind of device streaming you only need to get the specification of device. To list the device ffmpeg -f dshow -list_devices true -i dummy Command prompt will list all the aviable device on machine. [dshow @ 0000000004052420] DirectShow vid...

Page 3 of 4