This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For Remove Hardware features check following files in android source : | |
1. Check the device.mk file for your device(Like : device/<vendor>/<device>.mk) | |
2. Check the common.mk file for your device(Like : device/<vendor>/common/common.mk) | |
There both files is probably a line like the following: | |
PRODUCT_COPY_FILES += \ | |
frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ |
Key | Description | Uses |
audio.safemedia.force | true for safe media volume | https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/audio/AudioService.java |
config.disable_bluetooth | - | SystemServer |
config.disable_location | - | SystemServer |
You need to initialize TextureView
before opening a camera.
TextureView
is for displaying the image from camera on the device.
However, you cannot use it unless the texture is ready, either because the screen is currently off or it is initializing.
You should check mTextureView.isAvailable()
before opening your camera. Else you will mTextureView.setSurfaceTextureListener()
.
And open your camera in the callback method onSurfaceTextureListener
.
Before opening your camera you should check for a camera permission first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "JTT" : [ | |
{ "track" : { | |
"title" : "Test Activity", | |
"desc" : "Simple test activity walking around the block with a heart rate monitor, stopping once, and marking one lap. Recorded with Garmin Fenix 3, uploaded to Garmin Connect, and exported as GPX and TCX. Both exports are crippled because they do not contain all data fields of the activity.", | |
"segments" : [ | |
{ "data-fields" : ["latitude", "longitude", "elevation", "temperature", "HR" ] }, | |
[ | |
[ 47.407614681869745, 8.553115781396627, 451.79998779296875, "2015-11-13T12:57:24.000Z", 28.0, 76], | |
[ 47.40762138739228, 8.553108656778932, 451.0, "2015-11-13T12:57:25.000Z", 28.0, 76], | |
[ 47.407626835629344, 8.553094072267413, 450.0, "2015-11-13T12:57:26.000Z", 28.0, 76], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# backupAndroidDevice.sh | |
# | |
# A simple script to backup my Android phone to my Macbook. | |
# | |
# Syntax: backupAndroidDevice.sh output_folder | |
# output folder must exist | |
# | |
# Requirements/assumptions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.net.ConnectivityManager | |
import android.net.NetworkCapabilities | |
import android.os.Build | |
val Context.isConnected: Boolean | |
get() { | |
val connectivityManager = this.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager | |
return when { | |
Build.VERSION.SDK_INT >= Build.VERSION_CODES.M -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// references internal ContentObserver class | |
SettingsObserver observer = new SettingsObserver(new Handler()); | |
// start watching for changes | |
observer.observe(); | |
// where we do our work | |
updateSettings(); | |
// Anonymous inner class to handle watching Uris | |
class SettingsObserver extends ContentObserver { | |
SettingsObserver(Handler handler) { |
NewerOlder