if only detect usb pluged in or not when sometime, you may be use:
mBatteryService.getPlugType().



                                                                           
             tstanly                                                       
             <tsai.sta...@gmai                                             
             l.com>                                                 收件人 
             发件人:                   Android Developers                  
             android-developer         <[email protected] 
             [email protected]         m>                                  
             m                                                        抄送 
                                                                           
                                                                      主题 
             2009-09-07 13:57          [android-developers] Re: detect usb 
                                       device                              
                                                                           
                 请答复 给                                                 
             android-developer                                             
             [email protected]                                             
                     m                                                     
                                                                           
                                                                           





thanks!

and the other question,
is Android detect dynamically possible(on listening mode)?

that is,
when I'm in the Activity1, and insert a usb device,
then app can detect right now and use dialog send a message to user
the device is mounted!?

thanks

On 9月7日, 下午1時30分, "Roman ( T-Mobile USA)" <roman.baumgaert...@t-
mobile.com> wrote:
> You can detect when you attach a USB storage device.
>
> See android.intent.action.MEDIA_MOUNTED
>
> --
> Roman Baumgaertner
> Sr. SW Engineer-OSDC
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
> On Sep 6, 10:05 pm, tstanly <[email protected]> wrote:
>
>
>
> > hi all,
>
> > does sdk provides methods to detect whether a usb device plug in ?
> > if it's a android porting problem, I am so sorry...
>
> > thanks!- 隱藏被引用文字 -
>
> - 顯示被引用文字 -



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to