1.建立一个 BroadcastReceiver,监听"ACTION_HEADSET_PLUG" Intent
2.try {
startActivity(new Intent(..));
} catch (ActivityNotFoundException e) {
Toast.makeText(this, "Not installed.", LENGTH_SHORT).show();
}
第二个 那么简单郁闷了我很久
1.建立一个 BroadcastReceiver,监听"ACTION_HEADSET_PLUG" Intent
2.try {
startActivity(new Intent(..));
} catch (ActivityNotFoundException e) {
Toast.makeText(this, "Not installed.", LENGTH_SHORT).show();
}
第二个 那么简单郁闷了我很久