1. Download our Official Android App: Forums for Android!

shut down on OTG unplugged.

Discussion in 'Android Apps & Games' started by ulao, Feb 5, 2014.

  1. ulao

    ulao Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    36
    Posts:
    125
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    125
    9
    36
    I'm looking for an event app like tasker that will do a system event on OTG unplugged.

    I have a shut down on power un plugged but OTG cables force tablets ( nexus 7 2013 ) to not charge when plugged in. There are OS hacks to get around that but I'm not really interested in that.

    So as a work around I was thinking what about on OTG un-plug? Not finding anything out there?

    any thoughts?
     

    Advertisement

  2. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #28
    Points:
    1,063
    Posts:
    8,624
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,624
    9,949
    1,063
    Male
    SysAdmin
    Huntsville, AL
    I assume you're interested in detecting OTG storage removal? If it's always going to be the same storage, you can determine what mount point is used and get Tasker to watch for when that mount point (file) disappears (Event > File Deleted).

    Alternatively, you could use an application like USB OTG Helper to help out. That app can generate a notification when a device is mounted/unmounted, and you can use Tasker to act when that notification appears (Event > UI > Notification).

    I'm having trouble finding any options outside of Tasker, so I'm going to go ahead and move your question to the Tasker subforum (where it will be more likely to get neckbeard nerd attention; feel free to let me know if you'd prefer for it to stay in the general Applications board.
     
    ulao likes this.
  3. ulao

    ulao Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    36
    Posts:
    125
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    125
    9
    36
    I'd like the mounts to remember there positions. Most of the time on boot they do, but I could see that a problem, if thats what you mean

    I saw helper but didnt think of the double event idea. I may try it. I dont like tasker and use automate-it instead. So 'id like to be there or in general. If I find tasker the only way i'll report back. Thx for the help.

    It does not look like the helper will sense disconnect from the description but I will look a the app.
     
  4. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #28
    Points:
    1,063
    Posts:
    8,624
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    8,624
    9,949
    1,063
    Male
    SysAdmin
    Huntsville, AL
    Moved the thread back. Hope you don't get lost ;)

    BTW, even if Helper doesn't generate a separate notification on disconnect (but instead has an ongoing notification while the drive is connected), you *may* be able to register when that notification is removed. Something to think on :)
     
  5. ulao

    ulao Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    36
    Posts:
    125
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    125
    9
    36
    LOL yeah I did but I found it. Yeah herlper didnt get it, Not sure how to hook the event but going to play around a bit.
     
  6. ulao

    ulao Well-Known Member
    Thread Starter
    Rank:
    None
    Points:
    36
    Posts:
    125
    Joined:
    Apr 25, 2011

    Apr 25, 2011
    125
    9
    36
    I think it was under my nose the entire time, in automate it there is a usb unplug event -> shut down.

    Edit: err, no good. Event does not get triggered.

    Tried on charge no luck ( no shocker there )
    tried head set unplugged ( hoping it senses a voltage and not a physical state ), only works when unplugged so no go here.
     

Share This Page

Loading...