mobile CCTV,mobile surveillance,police body worn cameras

 forgetPW
 registerNow
search
view: 790|reply: 1
打印 prevThread nextThread

dsj-G6设备使用问题

[copyURL]

1

主题

1

帖子

15

积分

newBie

Rank: 1

积分
15
jumpTo
owner
poston 2020-3-28 16:30 | authorOnly 回帖奖励 |倒序浏览 |阅读模式
如何在自己的软件里监听设备的按键,以及取消原来按键的功能(例如长按录音)
reply

使用道具 report

6

主题

175

帖子

1258

积分

vipMem

Rank: 6Rank: 6

积分
1258
sofa
poston 2020-3-28 17:12 | authorOnly
G6执法仪硬件访问说明:
按键

录像键:

DOWN:  android.intent.action.ACTION_VIDEO_DOWN
UP:        android.intent.action.ACTION_VIDEO_UP

longpress:   android.intent.action.ACTION_VIDEO_LONG_PRESS


录音键:

DOWN:  android.intent.action.ACTION_RECORD_DOWN
UP:        android.intent.action.ACTION_RECORD_UP

longpress:   android.intent.action.ACTION_RECORD_LONG_PRESS


拍照键:

DOWN:  android.intent.action.ACTION_CAMERA_DOWN
UP:        android.intent.action.ACTION_CAMERA_UP

longpress:   android.intent.action.ACTION_CAMERA_LONG_PRESS

SOS:

DOWN:  android.intent.action.ACTION_SOS_DOWN
UP:        android.intent.action.ACTION_SOS_UP

longpress:   android.intent.action.ACTION_SOS_LONG_PRESS

PTT:

DOWN:  android.intent.action.ACTION_PTTKEY_DOWN
UP:        android.intent.action.ACTION_PTTKEY_UP

longpress:   android.intent.action.ACTION_PTT_LONG_PRESS

LED
客户调用摄像头时可以亮,可以使用下面的节点:

右边红色
sys/class/leds/aw2013_right_red/brightness
右边绿色
sys/class/leds/aw2013_right_green/brightness
右边红色闪烁
sys/class/leds/aw2013_right_red/blink

直接对这些节点写入操作。

获取ID
        private String getMacAddress() {
                try {
                        WifiManager wifi = (WifiManager) context
                                        .getSystemService(Context.WIFI_SERVICE);
                        WifiInfo info = wifi.getConnectionInfo();
                        return info.getMacAddress().replace(":", "");
                } catch (Exception e) {
                        Log.e("MPUDefaultDevice", "getMacAddress--->" + e.getMessage());
                }
                return null;
        }
       
        private String getImeiInfo() {
                TelephonyManager telephonyMgr = (TelephonyManager) context
                                .getSystemService(Context.TELEPHONY_SERVICE);
                return telephonyMgr.getDeviceId();
               
        }
       
        /*获取ID接口*/
        public String getStringDefaultDevice() {
                String stringDevice = null;
                try {
                        // stringDevice = getImeiInfo().subSequence(
                        // getImeiInfo().length() - 7, getImeiInfo().length())
                        // .toString();
                        stringDevice = getImeiInfo().subSequence(
                                        getImeiInfo().length() - 7, getImeiInfo().length())
                                        .toString();

                } catch (Exception e) {
                        Log.e("MPUDefaultDevice", "e--->" + e.getMessage());
                }
                try {
                        if (stringDevice == null) {
                                stringDevice = getMacAddress().subSequence(
                                                getMacAddress().length() - 7, getMacAddress().length())
                                                .toString();
                        }
                } catch (Exception e) {
                        Log.e("MPUDefaultDevice", "e--->" + e.getMessage());
                }
                if (stringDevice == null || stringDevice.equals("0000000")) {
                        stringDevice = "aff8866";
                }
                return "2" + stringDevice;
        }



reply agree Against

使用道具 report

creditRule

QQ|wireless surveillance

GMT+8, 2024-4-23 20:10 , Processed in 0.056631 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

QuickReply backToTop BackToList