如何设置USB连接模式?如何设置、模式、USB

2023-09-07 08:56:07 作者:做个吃货有何不可

我正在写这是应该转储SD卡,然后在一台PC另一个应用程序时,该设备被连接到个人电脑(在盘驱动模式),它应读出的数据上的数据的应用程序。 在我的HTC传说有一个对话框中进行选择:只收取,宏达电同步,磁盘驱动器。

I'm writing an application which is supposed to dump data on the SD card and then another application on a pc which should read the data when the device is connected to the pc (in disc drive mode). On my HTC Legend there is a dialog to choose between: Charge only, HTC Sync, Disk drive..

是否有可能来设置与该设备连接到PC模式 或者至少是意图要求用户切换模式?

Is there a possibility to set the mode with which the device is connecting to the pc or at least an intent to ask the user to switch the mode?

推荐答案

在HTC设备上,打开ConnectToPC服务(同时USB未插入)的管理应用程序(ICS - 可能适用于姜饼过,不记得了) ,并创下清除数据。然后,将USB回来了,你应该有不要再问可用的选项。选择您想要的模式,选中该复选框,并接受。

On HTC devices, open the ConnectToPC service (whilst USB is not plugged in) in Manage Apps (ICS - probably applies to Gingerbread too; don't remember), and hit Clear Data. Then, plug the USB back again, and you should have the option to "Don't ask again" available. Select your desired mode, check the box, and accept.