Alpha DevCon Engineering Roundtables
Results 1 to 15 of 15

Thread: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

  1. #1
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    One of PeopleNet's products is an Android tablet that has a docking station for trucks.

    My AA PhoneGap app can be USB plugged or un-plugged without any issues.

    However, if the tablet is docked or un-docked, the AA PhoneGap app restarts as if its icon were tapped!

    It is not a battery event, and Android has an android.intent.ACTION_DOCK_EVENT that is not handled or handled incorrectly in PhoneGap.

    Problem: What do I do so that the PhoneGap app will ignore that event?

    Apparently it defaults to RESTART as its response.

    I don't have this problem on any non-docking tablets.

    https://www.peoplenetonline.com/wp-c...compressed.pdf
    Last edited by CarlMPearson; 05-20-2017 at 04:11 PM.
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  2. #2
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I need to find a PhoneGap PlugIn for docking events.

    Or a starter PlugIn for PhoneGap, and I'll muddle through.

    PhoneGap app restarts whenever a DOCK_EVENT occurs.
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  3. #3
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Alpha staff has helped find POSSIBLE Android plug-ins, but no help in how to use them.

    Does anyone else have PhoneGap applications that are being disrupted by DOCK events?

    android.intent.action.DOCK_EVENT

    The customer is willing to fund some assistance in this area.
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,068

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Which plugins, specifically?

  5. #5
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    There are a few that look interesting.
    cordova-plugin-intent
    com-darryncampbell-cordova-plugin-intent
    ... more

    I need to somehow stop the PhoneGap app from restarting when it either docks or undocks.

    action.DOCK_EVENT is what I think is the culprit.

    I get along well with Alpha, and Alpha handles PhoneGap well, but this is an unusual case but keeping 50 users from the application.

    150 non-docking tablets are operational. It is not a POWER intent, otherwise the app would restart then.

    I have many unproductive hours on this and not the bandwidth to wrestle it down.
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,068

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I wonder if an app like Car Mode Off would help?

  7. #7
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I'm unaware of what Car Mode Off does. Will investigate.

    There might already be an app for the issue (I hope so!) but it might be a matter of phrasing the search correctly.

    Sound more promising than the corner I'm in now!
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,068

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Yes... that was my thinking. There seem to be a lot of "car dock" apps around. I'm wondering if something like Car Mode Off would override the car dock event.

    Also look at Dock No-Op

  9. #9
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I just got through testing Dock No-Op.

    Nope, it restarted the Alpha built PhoneGap app.

    And my hopes were so high ..........................
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  10. #10
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,068

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Rats...

  11. #11
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    1,575

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Has anyone tried to turn the Car Dock off on the device? Just asking as I saw that as an option on a previous device I had.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com OR my Developer Chat
    Any sufficiently advanced bug is indistinguishable from a feature.

  12. #12
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    If that is an Android setting, I'd love to hear about it.

    It might be an OEM hardcoded setting.

    At this moment, I'm stalled out about how to solve this issue under PhoneGap..
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

  13. #13
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,068

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I'd read this a few times while researching your issue... although I'm not sure it would be affect by a hardware trigger...

    Hi guys. I got car mode completely disabled by doung the following....
    go to application manager - all applications - search for car mode and force stop.

    Then go to applications and select car mode, it will take you through the steps again to set it up and there will be a box that is ticked saying start car mode automaticle when connected to this bluetooth device, untick and complete setup.

    Then follow steps in application manager and force stop.
    From this post...

    https://forums.androidcentral.com/sp...ar-mode-2.html

  14. #14
    "Certified" Alphaholic CharlesParker's Avatar
    Real Name
    Charles Parker
    Join Date
    Dec 2012
    Location
    New Orleans, LA
    Posts
    1,575

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    Yes that is what I was referring to. I had a phone (android) that had a cardock option. It was fine and all except it was annoying so I remember changing a setting to disable it altogether. I beleive this is a DEVICE specific issue, that you can turn off.
    NWCOPRO Nuisance Wildlife Control Software-My Application: http://www.nwcopro.com OR my Developer Chat
    Any sufficiently advanced bug is indistinguishable from a feature.

  15. #15
    Member CarlMPearson's Avatar
    Real Name
    Carl M. Pearson
    Join Date
    Nov 2009
    Location
    Dallas, TX
    Posts
    270

    Default Re: PhoneGap app restarts when docked or un-docked in truck mount - PeopleNet

    I don't see any apps with names like CAR or DOCK or ....

    I might force stop on tasks to see if they are the culprit.

    Thanks. It's comforting to know I'm not the only one obsessed with this PITA issue! :^))

    Added
    I force-stopped every application in APPS except SOTI's MobiControl which did not offer that capability.

    MobiControl is required for fleet management of programs and configuration so killing it is not an option.

    So I'm back to adding a PhoneGap Plug-In that will STOP the app from restarting when it is docked or un-docked.
    Last edited by CarlMPearson; 06-17-2017 at 11:02 AM.
    Carl ~ Dallas, TX
    I'm so old that pool balls came with Roman Numerals

Similar Threads

  1. Concrete Truck App
    By pcaspa in forum Tablet-Optimized Form Capabilities Beta
    Replies: 1
    Last Post: 12-08-2015, 01:09 PM
  2. Docked ajax pop up window problem
    By richardurban in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 06-19-2015, 07:13 AM
  3. A LTR & RTL docked panels within a panelayout header
    By bob9145 in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 05-21-2015, 11:47 AM
  4. Docked Panel Controller Buttons - button is lost
    By JPMPA in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 08-25-2014, 04:14 PM
  5. v11 still lags using property docked panel
    By fddizon in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 11-06-2011, 08:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •