小编Sun*_*ahu的帖子

usb鼠标在linux内核中使用了哪些驱动程序?

我从LDD3第14章读到有关hotplug驱动程序的信息.我需要编写一个usb鼠标驱动程序,当我插入硬件时它会加载.现在,做一些实验,我发现有一个名为"hid-generic"的驱动程序在插拔时被调用.

[ 6654.232046] usb 3-1: new low-speed USB device number 3 using uhci_hcd
[ 6654.462061] usb 3-1: New USB device found, idVendor=093a, idProduct=2510
[ 6654.462067] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 6654.462071] usb 3-1: Product: USB OPTICAL MOUSE
[ 6654.462074] usb 3-1: Manufacturer: PIXART
[ 6654.489316] input: PIXART USB OPTICAL MOUSE as /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/input/input12
[ 6654.489445] hid-generic 0003:093A:2510.0004: input,hidraw0: USB HID v1.10 Mouse [PIXART USB OPTICAL MOUSE] on usb-0000:00:1d.1-1/input0
Run Code Online (Sandbox Code Playgroud)

还有lsmod节目,

Module                  Size  Used by
hid_generic            12541  0 …
Run Code Online (Sandbox Code Playgroud)

linux usb mouse kernel linux-kernel

12
推荐指数
1
解决办法
1万
查看次数

如何在Android选择器列表中列出应用程序作为电子邮件客户端?

我正在尝试将我的Android应用程序添加到Chooser列表中作为电子邮件客户端.然而,它并没有出现在Gmail和K-9应用程序的旁边.为了测试它,我试图从whatsapp应用程序聊天的"电子邮件聊天"功能分享聊天数据(因为它只显示电子邮件应用程序).

我只有一项活动.当我从浏览器共享文本数据时,我的应用程序在选择列表中,但是当我从Whatsapp共享电子邮件数据时,我的应用程序没有.我尝试在AndroidManifest.xml中添加以下intent动作,但它不起作用.

        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="text/*" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="image/*" />
            <data android:mimeType="text/*" />
        </intent-filter>
Run Code Online (Sandbox Code Playgroud)

从调试开始,我发现K-9正在推出如下,

08-30 00:27:28.064 489-2302/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
08-30 00:27:28.064 1685-2620/? I/ActivityManager: START u0 {act=android.intent.action.CHOOSER cmp=android/com.android.internal.app.ChooserActivity (has extras)} from uid 10158 on display 0
08-30 00:27:28.064 489-24642/? I/Thermal-Lib: Thermal-Lib-Client: Client request sent
08-30 00:27:28.064 753-1089/? I/ThermalEngine: Thermal-Server: Thermal received msg …
Run Code Online (Sandbox Code Playgroud)

email android intentfilter android-intent mime-types

12
推荐指数
1
解决办法
461
查看次数