Android – AudioManager – Controle de volume com UI nativa do sistema

Android Audio

/**
FLAG_SHOW_UI
Show a toast containing the current volume.
See also:
    adjustStreamVolume(int, int, int)
    adjustVolume(int, int)
    setStreamVolume(int, int, int)
    setRingerMode(int)
*/

https://developer.android.com/reference/android/media/AudioManager.html#FLAG_SHOW_UI

Android – Conectando o adb por wireless (ADB over wireless)

android wifi adb wirelles

Com o dispositivo conectado já no modo de desenvolvimento e debug ativado execute:

adb tcpip 5555

Retire o cabo USB pegue o IP do dispositivo nas configurações de Wifi e execute:

adb connect [IP DO DISPOSITIVO]

Pronto, seu dispositivo está conectado por wireless, pronto para debug

Android – DialogFragment setStyle

Android

//1 -> style = DialogFragment.STYLE_NO_TITLE
//2 -> style = DialogFragment.STYLE_NO_FRAME
//3 -> style = DialogFragment.STYLE_NO_INPUT
//4 -> style = DialogFragment.STYLE_NORMAL
//            --
//4 -> theme = android.R.style.Theme_Holo
//5 -> theme = android.R.style.Theme_Holo_Light_Dialog
//6 -> theme = android.R.style.Theme_Holo_Light
//7 -> theme = android.R.style.Theme_Holo_Light_Panel
setStyle(DialogFragment.STYLE_NO_TITLE, android.R.style.Theme_Holo_Light_Dialog)

Android – Calculando a intensidade do sinal wifi (Getting WiFi signal strength in Android)

android wifi

WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
int numberOfLevels = 5;
WifiInfo wifiInfo = wifiManager.getConnectionInfo();Referência
int level = WifiManager.calculateSignalLevel(wifiInfo.getRssi(), numberOfLevels);

Referência: https://developer.android.com/reference/android/net/wifi/WifiManager.html#calculateSignalLevel%28int,%20int%29