Skip to content

Instantly share code, notes, and snippets.

package com.xinghui.notificationlistenerservicedemo;
import android.app.ActivityManager;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.IBinder;
import android.os.Process;
@takeseem
takeseem / UndertowServer.java
Created July 25, 2018 09:26 — forked from vmarcinko/UndertowServer.java
Undertow-Spring MVC integration
package vmarcinko.undertow;
import io.undertow.Handlers;
import io.undertow.Undertow;
import io.undertow.server.HttpHandler;
import io.undertow.server.handlers.PathHandler;
import io.undertow.server.handlers.RedirectHandler;
import io.undertow.server.handlers.resource.FileResourceManager;
import io.undertow.servlet.Servlets;
import io.undertow.servlet.api.DeploymentInfo;
@takeseem
takeseem / a2dp
Last active October 26, 2022 00:34
Fixing bluetooth headset problem in xubuntu 16.04.
#!/bin/bash
# headset mac
mac="00:1D:DF:67:0A:29"
profile="a2dp"
# Special Bluetooth controller
btMac=""
# connect|disconnect wait time
waitTime=5
macId="${mac//:/_}"