Demo entry 6720907

java

   

Submitted by anonymous on Mar 19, 2018 at 09:55
Language: Java. Code size: 534 Bytes.

BinderPool binderPool = BinderPool.getInstance(mContext);
        //第一个模块
        IBinder binder = binderPool.queryBinder(AppConstant.RADIO_BINDER);
        IRadioPlay radioPlay = IRadioPlay.Stub.asInterface(binder);
        IRadioListener listener = new IRadioListener.Stub() {
        .........
        };

        try {
            radioPlay.setOnVoiceListener(listener);
            Log.d(TAG, "radioBinder: 客户端发送给服务端注册监听:" + listener);
        } catch (RemoteException e) {
            e.printStackTrace();
        }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).