navigation - How to navigate to android USB Mass Storage Activity? -
i usb mass storage activity turn on or off usb mode when device connected pc.i have implemented application follows.
public class usb_connectactivity extends activity { /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); final string state = environment.getexternalstoragestate(); ((button)findviewbyid(r.id.onbutton)).setonclicklistener(new onclicklistener() { @override public void onclick(view v) { if (!(environment.media_shared.equals(state))) { //how navigate android usb mass storage page } } }); ((button)findviewbyid(r.id.offbutton)).setonclicklistener(new onclicklistener() { @override public void onclick(view v) { if ((environment.media_shared.equals(state))) { //how navigate android usb mass storage page } } }); } } from above code have used 2 buttons turn off , on usb mass storage.but don't have more information navigate android in built usb mass storage page. please body me.
if want launch usb mass storage activity, question exact duplicate of: android intent open "mass storage activity" , should closed.
if want change status of usb mode, looks like, isn't duplicate (as far can tell), answer still: can't it.
maybe there's better way, when want know intents available launching system activities, @ android sdk documentation intent , search "activity action". shows many system activities can launch, such "battery use" activity , uninstallation activity. there's nothing there showing usb mode activity public intent. excusing pun, intentional.
and there's no documentation can find way programmatically turn usb mode on or off, , presumably intentional.
Comments
Post a Comment