0

マニフェストで定義されたブロードキャストレシーバーがあり、インテントフィルターにandroid.bluetooth.device.action.ACL_CONNECTEDがあります。

アプリがスタックにある場合は正常にトリガーされますが、Android設定から停止すると、トリガーされなくなります。助言がありますか?

メニーのアップデート:

<receiver android:name=".auto.AppLauncher">
   <intent-filter>
        <action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
   </intent-filter>
</receiver>
4

1 に答える 1

0

コードで BroadcastReceiver をプログラムしましたか?

    public class receiver extends BroadcastReceiver {

        @Override
        public void onReceive(Context context, Intent intent) {
            if(intent.getAction().equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
                    //something you want to do here
            }
        }
    }
于 2013-03-26T23:59:26.813 に答える